nsICrashReporter 编辑

xpcom/system/nsICrashReporter.idlScriptable Provides access to crash reporting functionality. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Method overview

void annotateCrashReport(in ACString key, in ACString data);
void appendAppNotesToCrashReport(in ACString data);
void appendObjCExceptionInfoToAppNotes(in voidPtr aException); Native code only!
void writeMinidumpForException(in voidPtr aExceptionInfo); Native code only!

Attributes

AttributeTypeDescription
enabledbooleanEnable or disable the crashreporter at runtime.
minidumpPathnsILocalFileGet or set the path on the local system to which minidumps will be written when a crash happens.
Exceptions thrown
NS_ERROR_NOT_INITIALIZED
If crash reporting is not initialized.
serverURLnsIURLGet or set the URL to which crash reports will be submitted. Only https and http URLs are allowed, as the submission is handled by OS-native networking libraries.
Exceptions thrown
NS_ERROR_FAILURE
On get if no URL is set.
NS_ERROR_INVALID_ARG
On set if a non-http(s) URL is assigned.
NS_ERROR_NOT_INITIALIZED
If crash reporting is not initialized.
submitReportsbooleanUser preference for submitting crash reports.

Methods

annotateCrashReport()

Add some extra data to be submitted with a crash report.

void annotateCrashReport(
  in ACString key,
  in ACString data
);
Parameters
key
Name of the data to be added.
data
Data to be added.
Exceptions thrown
NS_ERROR_INVALID_ARG
If key or data contain invalid characters. Invalid characters for key are '=' and '\n'. Invalid character for data is '\0'.
NS_ERROR_NOT_INITIALIZED
If crash reporting not initialized.

appendAppNotesToCrashReport()

Append some data to the "Notes" field, to be submitted with a crash report. Unlike annotateCrashReport(), this method will append to existing data.

void appendAppNotesToCrashReport(
  in ACString data
);
Parameters
data
Data to be added.
Exceptions thrown
NS_ERROR_INVALID_ARG
If data contains invalid characters. The only invalid character is '\0'.
NS_ERROR_NOT_INITIALIZED
If crash reporting not initialized.
Native code only!

appendObjCExceptionInfoToAppNotes

Append note containing an Obj-C exception's info.

void appendObjCExceptionInfoToAppNotes(
  in voidPtr aException
);
Parameters
aException
NSException object to append note for.
Native code only!

writeMinidumpForException

Write a minidump immediately, with the user-supplied exception information. This is implemented on Windows only, because SEH (structured exception handling) exists on Windows only.

void writeMinidumpForException(
  in voidPtr aExceptionInfo
);
Parameters
aExceptionInfo
EXCEPTION_INFO* provided by Window's SEH.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:119 次

字数:5825

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文