2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Interfaces for representing cross-language exceptions and stack traces.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2015-03-07 13:30:34 +00:00
|
|
|
[scriptable, uuid(9787bc41-1ec9-4fe0-8b31-ffee5db6a893)]
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
interface nsIStackFrame : nsISupports
|
|
|
|
{
|
|
|
|
// see nsIProgrammingLanguage for list of language consts
|
2012-08-22 15:56:38 +00:00
|
|
|
readonly attribute uint32_t language;
|
2014-01-20 16:51:41 +00:00
|
|
|
readonly attribute AUTF8String languageName;
|
2014-04-12 02:20:40 +00:00
|
|
|
readonly attribute AString filename;
|
|
|
|
readonly attribute AString name;
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
// Valid line numbers begin at '1'. '0' indicates unknown.
|
2012-08-22 15:56:38 +00:00
|
|
|
readonly attribute int32_t lineNumber;
|
2014-09-22 18:28:31 +00:00
|
|
|
readonly attribute int32_t columnNumber;
|
2014-01-20 16:51:41 +00:00
|
|
|
readonly attribute AUTF8String sourceLine;
|
2015-03-07 13:30:34 +00:00
|
|
|
readonly attribute AString asyncCause;
|
|
|
|
readonly attribute nsIStackFrame asyncCaller;
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
readonly attribute nsIStackFrame caller;
|
|
|
|
|
2014-07-04 05:25:16 +00:00
|
|
|
// Returns a formatted stack string that looks like the sort of
|
|
|
|
// string that would be returned by .stack on JS Error objects.
|
|
|
|
// Only works on JS-language stack frames.
|
|
|
|
readonly attribute AString formattedStack;
|
|
|
|
|
2014-01-20 16:51:41 +00:00
|
|
|
AUTF8String toString();
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
};
|
|
|
|
|
2014-04-12 02:20:40 +00:00
|
|
|
[scriptable, uuid(1caf1461-be1d-4b79-a552-5292b6bf3c35)]
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
interface nsIException : nsISupports
|
|
|
|
{
|
|
|
|
// A custom message set by the thrower.
|
2014-01-20 16:51:41 +00:00
|
|
|
[binaryname(MessageMoz)] readonly attribute AUTF8String message;
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
// The nsresult associated with this exception.
|
|
|
|
readonly attribute nsresult result;
|
|
|
|
// The name of the error code (ie, a string repr of |result|)
|
2014-01-20 16:51:41 +00:00
|
|
|
readonly attribute AUTF8String name;
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
|
|
|
|
// Filename location. This is the location that caused the
|
|
|
|
// error, which may or may not be a source file location.
|
|
|
|
// For example, standard language errors would generally have
|
|
|
|
// the same location as their top stack entry. File
|
|
|
|
// parsers may put the location of the file they were parsing,
|
|
|
|
// etc.
|
|
|
|
|
|
|
|
// null indicates "no data"
|
2014-04-12 02:20:40 +00:00
|
|
|
readonly attribute AString filename;
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
// Valid line numbers begin at '1'. '0' indicates unknown.
|
2012-08-22 15:56:38 +00:00
|
|
|
readonly attribute uint32_t lineNumber;
|
2015-02-13 17:21:50 +00:00
|
|
|
// Valid column numbers begin at 0.
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
// We don't have an unambiguous indicator for unknown.
|
2012-08-22 15:56:38 +00:00
|
|
|
readonly attribute uint32_t columnNumber;
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
|
|
|
|
// A stack trace, if available.
|
|
|
|
readonly attribute nsIStackFrame location;
|
|
|
|
// An inner exception that triggered this, if available.
|
|
|
|
readonly attribute nsIException inner;
|
|
|
|
|
|
|
|
// Arbitary data for the implementation.
|
|
|
|
readonly attribute nsISupports data;
|
|
|
|
|
|
|
|
// A generic formatter - make it suitable to print, etc.
|
2014-01-20 16:51:41 +00:00
|
|
|
AUTF8String toString();
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
};
|