Customizing error reports
Add diagnostic data to every error report, conditionally adjust error reports, or indeed, skip notifying Bugsnag of the error.
Adding callbacks
If you’d like to add diagnostic data to every error report, or adjust error reports conditionally, you can add callbacks which will be invoked each time a report will be sent.
To cancel the error report, return false from the function.
See $report object for methods available within the callback.
The $report object
The following properties and methods are available on the $report object.
addMetaData
Add additional metadata to the error report, or delete existing metadata. Properties with a value of null will be deleted.
Conflicting properties will be merged recursively, favouring the newest values. For example:
getContext
Gets the current context of the report.
getStacktrace
Gets the Stacktrace object attached to the error report, which contains the frames describing the series of calls leading to the error.
The Stacktrace object responds to the following methods:
method | description |
---|---|
getFrames() | Returns an Array of frames |
addFrame($file, $line, $method, $class=null) | Creates a new frame in the stacktrace, adding it to the end of the frames array |
removeFrame($index) | Removes a frame at the given index |
The stacktrace is populated by frame arrays which have the following properties:
property | type | description |
---|---|---|
lineNumber | int | The line number the frame occurred on |
method | string | The called method and, if available, the parent class |
code | array | An array of code lines surrounding the called method if sending code is enabled |
inProject | bool | Whether the frame occurred inside the project codebase. This is predetermined based on the frame’s file path and your configured project root, but can be set manually to improve grouping and stacktrace readability |
file | string | The file the frame occurred in, with the path stripped as described here |
getUser
Gets the associated user on the error.
originalError
The error that caused the event in your application. This will be a Throwable if the error was caused by an exception, an array if the error was caused by a PHP error, such as a warning, or null if the error was reported with notifyError .
If the originalError is an array, it will have this structure:
key | description |
---|---|
code | An integer error code, as described in the PHP manual |
message | The error message |
file | The file path where the error occurred |
line | The line number where the error occurred |
fatal | A boolean indicating if this was a fatal error |
Manipulating originalError does not affect the error information reported to the Bugsnag dashboard.
setContext
Providing context for where the error occurred, context is given high visual prominence in the dashboard helping you to track specific issues quickly. This is typically set to a filename or request path automatically, depending on the framework and application type.
setGroupingHash
Sets the grouping hash of the error report. All errors with the same grouping hash are grouped together. This is an advanced usage of the library and mis-using it will cause your errors not to group properly in your dashboard.
setMessage
Set the error message sent in the error report
setMetaData
Set additional metadata to send with this error report, or replace existing metadata.
If a conflict occurs while merging, the conflicting values will be placed into an array under the same key. For example:
You can also pass a 2nd paramater of false stop us merging your metadata, and force us to completely replace it. For example:
setName
Set the error name sent in the error report
setSeverity
Set the severity of the error report. Valid severities are error , warning , and info .
By default, all unhandled exceptions are set to severity error and all handled exceptions are set to severity warning .
setUser
You can set the associated user on the error.
3 простых шага по исправлению ошибок SEND-ERROR-REPORT.EXE
Подробности файле с именем send-error-report.exe
Очистите мусорные файлы, чтобы исправить send-error-report.exe, которое перестало работать из-за ошибки.
- Запустите приложение Asmwsoft Pc Optimizer.
- Потом из главного окна выберите пункт «Clean Junk Files».
- Когда появится новое окно, нажмите на кнопку «start» и дождитесь окончания поиска.
- потом нажмите на кнопку «Select All».
- нажмите на кнопку «start cleaning».
Очистите реестр, чтобы исправить send-error-report.exe, которое перестало работать из-за ошибки
Как удалить заблокированный файл
- В главном окне Asmwsoft Pc Optimizer выберите инструмент «Force deleter»
- Потом в «force deleter» нажмите «Выбрать файл», перейдите к файлу send-error-report.exe и потом нажмите на «открыть».
- Теперь нажмите на кнопку «unlock and delete», и когда появится подтверждающее сообщение, нажмите «да». Вот и все.
Настройка Windows для исправления критических ошибок send-error-report.exe:
- Нажмите правой кнопкой мыши на «Мой компьютер» на рабочем столе и выберите пункт «Свойства».
- В меню слева выберите » Advanced system settings».
- В разделе «Быстродействие» нажмите на кнопку «Параметры».
- Нажмите на вкладку «data Execution prevention».
- Выберите опцию » Turn on DEP for all programs and services . » .
- Нажмите на кнопку «add» и выберите файл send-error-report.exe, а затем нажмите на кнопку «open».
- Нажмите на кнопку «ok» и перезагрузите свой компьютер.
Как другие пользователи поступают с этим файлом?
Всего голосов ( 202 ), 133 говорят, что не будут удалять, а 69 говорят, что удалят его с компьютера.
Как вы поступите с файлом send-error-report.exe?
Некоторые сообщения об ошибках, которые вы можете получить в связи с send-error-report.exe файлом
- (send-error-report.exe) столкнулся с проблемой и должен быть закрыт. Просим прощения за неудобство.
- (send-error-report.exe) перестал работать.
- send-error-report.exe. Эта программа не отвечает.
- (send-error-report.exe) — Ошибка приложения: the instruction at 0xXXXXXX referenced memory error, the memory could not be read. Нажмитие OK, чтобы завершить программу.
- (send-error-report.exe) не является ошибкой действительного windows-приложения.
- (send-error-report.exe) отсутствует или не обнаружен.
SEND-ERROR-REPORT.EXE
Проверьте процессы, запущенные на вашем ПК, используя базу данных онлайн-безопасности. Можно использовать любой тип сканирования для проверки вашего ПК на вирусы, трояны, шпионские и другие вредоносные программы.
Sending Error Reports
Enabling or Disabling Crash Report Delivery
The CrashSender.exe is by default assumed to be located in the same folder as CrashRpt.dll. Optionally, you can specify a different path using the CR_INSTALL_INFO::pszCrashSenderPath structure member.
If your want to just collect and save crash report files to disc, but not to send the report, you can specify CR_INST_DONT_SEND_REPORT flag for CR_INSTALL_INFO::dwFlags member. This forces CrashSender.exe to exit after crash report data collection is finished.
By default, CrashRpt stores error report files in uncompressed state. If you want to additionally compress error reports and store them as ZIP archives, specify the CR_INST_STORE_ZIP_ARCHIVES flag for CR_INSTALL_INFO::dwFlags member.
Where does CrashRpt Store Error Report Files?
Sending Error Report Dialog
Sending Error Report Dialog
Certain delivery method can be disabled by specifying special constant CR_NEGATIVE_PRIORITY as method’s priority.
In the Sending Error Report dialog, there is a status log area below the progress bar control. It contains the details of report delivery process. The log may be useful when troubleshooting error report delivery issues.
A user can copy some selected lines or the whole log to the clipboard. To do this, he should select several lines of the log, right-click the selection and choose an item from the context menu.
Note: The Sending Error Report dialog becomes hidden in three seconds after start. Then it is displayed as icon in system tray. Double-click the icon to restore the dialog. The dialog is restored automatically when user interaction is required.
Queued Error Report Delivery
On application start up, CrashRpt checks if it is time to remind user about recent error reports ready for delivery, shows notification balloon and offers user to deliver them (see the figure below). CrashRpt shows notification balloon if at least one week elapsed since the last notification.
Notification Balloon
Sending Recent Error Reports
Sending Crash Report Using HTTP Connection
CrashRpt supports HTTP file uploads as described in RFC-1867. This mechanism allows to upload large files by using binary content transfer encoding. The «multipart/form-data» encoding type is utilized for this purpose.
The equivalent HTML form for file uploads is presented below (some form fields may be omitted, see the next section for the complete list of fields that may appear):
Script Parameters
The server-side script may receive the following POST parameters. In PHP, these parameters are part of $_POST global array.
Parameter Name | Example value | Remarks | ||||
---|---|---|---|---|---|---|
md5 | «af89e902b42cd301092bb34530984e59» | This parameter contains the MD5 hash of error report data. This can be used to check error report integrity. | ||||
appname | «MyApp» | Application name (as passed to CR_INSTALL_INFO::pszAppName structure member). This parameter is available in error report sent by CrashRpt v.1.2.2 or later. | ||||
appversion | «1.0.0» | Application version (as passed to CR_INSTALL_INFO::pszAppVersion structure member). This parameter is available in error report sent by CrashRpt v.1.2.2 or later. | ||||
crashguid | «37b4d6da-1211-4e62-adc6-174acb53ddf5» | Crash GUID (globally unique identifier). This parameter is available in error report sent by CrashRpt v.1.2.2 or later. | ||||
emailsubject | «MyApp 1.0.0 Error Report» | E-mail subject (as passed to CR_INSTALL_INFO::pszEmailSubject structure member). This parameter is available in error report sent by CrashRpt v.1.2.2 or later. | ||||
emailfrom | «user@example.com» | E-mail of the user who sent this report. This parameter is available in error report sent by CrashRpt v.1.2.2 or later. | ||||
description | «I just started the app and then it crashed. Help!» | User-provided problem description. This parameter is available in error report sent by CrashRpt v.1.2.2 or later. The server side script may receive the following file attachments. In PHP, these parameters are part of $_FILES global array.
Return ValueIf the script succeeds in saving the error report, it should return the «200 Success» as server responce header. If the script encounters an error, it should return a 4xx error code, for example «450 Invalid parameter». Note that some error codes are reserved by HTTP specification. If the script uses custom error codes, they shouldn’t intersect with standard predefined HTTP codes. Note: When creating your own script, be careful with the script’s return code. If your script succeeds in saving error report it should return ‘200 Success’. If crash sending process encounters another error code, it attempts sending the error report using another way. In such situation you may receive the same error report several times through different transport. Sample PHP ScriptSending Crash Report Using SMTP ConnectionMany SMTP servers may block direct access to them from dynamic IPs to avoid spam (for example Google Mail does so). This delivery method may also fail if firewall blocks outgoing connections on port 25. Because of this reason, this delivery method is recommended to use if you install your application to a single machine with installed SMTP server (for example, server applications may fit this requirements). To specify the address of the SMTP server, use CR_INSTALL_INFO::pszSmtpProxy structure member. This parameter defines the network address (IP or domain) and, optionally, port formatted as «address[:port]» of SMTP server. To specify the recipient of E-mail messages, you use the CR_INSTALL_INFO::pszEmailTo structure member. You can specify the subject of E-mail message using the CR_INSTALL_INFO::pszEmailSubject structure member. If CR_INSTALL_INFO::pszSmtpProxy is not provided, CrashRpt tries to determine the SMTP server’s address from the recipient E-mail address’s MX domain record and relays the email message to that server. If SMTP server requires authentication, you can specify the login and password through CR_INSTALL_INFO::pszSmtpLogin and CR_INSTALL_INFO::pszSmtpPassword members, respectively. By default CrashRpt generates an E-mail message’s text automatically, but if you want to override the E-mail text, you can use the CR_INSTALL_INFO::pszEmailText structure member. Sending Crash Report Using Simple MAPITo specify the recipient of E-mail messages, you use the CR_INSTALL_INFO::pszEmailTo structure member. You can specify the subject of E-mail message using the CR_INSTALL_INFO::pszEmailSubject structure member. By default CrashRpt generates an E-mail message’s text automatically, but if you want to override the E-mail text, you can use the CR_INSTALL_INFO::pszEmailText structure member. Error Report Size LimitationsIn case you plan to deliver error reports over E-mail (SMTP or Simple MAPI), than error reports should be as small as possible. This is because of limitations of email attachment size. If the error report is larger than the limit (which may be different for different mail servers), it is possible that the error report will be rejected. Adblockdetector |