2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04: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 21:42:36 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Interfaces for representing cross-language exceptions and stack traces.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
// XXX - most "string"s in this file should probably move to Unicode
|
|
|
|
// so may as well use AStrings...
|
|
|
|
|
|
|
|
|
|
|
|
[scriptable, uuid(91d82105-7c62-4f8b-9779-154277c0ee90)]
|
|
|
|
interface nsIStackFrame : nsISupports
|
|
|
|
{
|
|
|
|
// see nsIProgrammingLanguage for list of language consts
|
2012-08-22 19:56:38 +04:00
|
|
|
readonly attribute uint32_t language;
|
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 21:42:36 +04:00
|
|
|
readonly attribute string languageName;
|
|
|
|
readonly attribute string filename;
|
|
|
|
readonly attribute string name;
|
|
|
|
// Valid line numbers begin at '1'. '0' indicates unknown.
|
2012-08-22 19:56:38 +04:00
|
|
|
readonly attribute int32_t lineNumber;
|
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 21:42:36 +04:00
|
|
|
readonly attribute string sourceLine;
|
|
|
|
readonly attribute nsIStackFrame caller;
|
|
|
|
|
|
|
|
string toString();
|
|
|
|
};
|
|
|
|
|
|
|
|
[scriptable, uuid(F3A8D3B4-C424-4edc-8BF6-8974C983BA78)]
|
|
|
|
interface nsIException : nsISupports
|
|
|
|
{
|
|
|
|
// A custom message set by the thrower.
|
2008-02-12 07:11:07 +03:00
|
|
|
[binaryname(MessageMoz)] readonly attribute string 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 21:42:36 +04:00
|
|
|
// The nsresult associated with this exception.
|
|
|
|
readonly attribute nsresult result;
|
|
|
|
// The name of the error code (ie, a string repr of |result|)
|
|
|
|
readonly attribute string name;
|
|
|
|
|
|
|
|
// 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"
|
|
|
|
readonly attribute string filename;
|
|
|
|
// Valid line numbers begin at '1'. '0' indicates unknown.
|
2012-08-22 19:56:38 +04:00
|
|
|
readonly attribute uint32_t lineNumber;
|
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 21:42:36 +04:00
|
|
|
// Valid column numbers begin at 0.
|
|
|
|
// We don't have an unambiguous indicator for unknown.
|
2012-08-22 19:56:38 +04: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 21:42:36 +04: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.
|
|
|
|
string toString();
|
|
|
|
};
|