DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (27a812186ff4)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* 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/. */

/*
 * Interfaces for representing cross-language exceptions and stack traces.
 */


#include "nsISupports.idl"

[scriptable, uuid(60abee59-717e-477d-8bbb-a1c3e7067126)]
interface nsIStackFrame : nsISupports
{
    // see nsIProgrammingLanguage for list of language consts
    readonly attribute uint32_t                language;
    readonly attribute AUTF8String             languageName;
    readonly attribute AUTF8String             filename;
    readonly attribute AUTF8String             name;
    // Valid line numbers begin at '1'. '0' indicates unknown.
    readonly attribute int32_t                 lineNumber;
    readonly attribute AUTF8String             sourceLine;
    readonly attribute nsIStackFrame           caller;

    AUTF8String toString();
};

[scriptable, uuid(6738090a-ba6f-4f3f-8aa0-b9f6311262a5)]
interface nsIException : nsISupports
{
    // A custom message set by the thrower.
    [binaryname(MessageMoz)] readonly attribute AUTF8String message;
    // The nsresult associated with this exception.
    readonly attribute nsresult                result;
    // The name of the error code (ie, a string repr of |result|)
    readonly attribute AUTF8String             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 AUTF8String             filename;
    // Valid line numbers begin at '1'. '0' indicates unknown.
    readonly attribute uint32_t                lineNumber;
    // Valid column numbers begin at 0. 
    // We don't have an unambiguous indicator for unknown.
    readonly attribute uint32_t                columnNumber;

    // 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.
    AUTF8String toString();
};