backtrace-node
Version:
Backtrace error reporting tool
66 lines (65 loc) • 1.75 kB
TypeScript
import { ISourceCode } from './sourceCode';
/**
* Reprresent single stack frame in stack trace
*/
interface IBacktraceStackFrame {
funcName: string;
sourceCode: string | undefined;
path: string;
line: number;
column: number;
}
/**
* Analyse stack trace generated by exception
* Create Stack Frames and find calling library/program informaiton
*/
export declare class BacktraceStackTrace {
private readonly error;
readonly fault: boolean;
readonly name = "main";
stack: IBacktraceStackFrame[];
sourceCodeInformation: {
[index: string]: ISourceCode;
};
symbolicationMaps?: Array<{
file: string;
uuid: string;
}>;
private symbolicationPaths;
private callingModulePath;
private readonly stackLineRe;
private requestedSourceCode;
private tabWidth;
private contextLineCount;
constructor(error: Error);
setSourceCodeOptions(tabWidth: number, contextLineCount: number): void;
/**
* Get calling module path
*/
getCallingModulePath(): string | undefined;
/**
* Get Json data from Stack trace object
*/
toJson(): {
name: string;
fault: boolean;
stack: IBacktraceStackFrame[];
};
/**
* Get source code information
*/
getSourceCode(): {
[index: string]: ISourceCode;
};
/**
* Start parsing stack frames
*/
parseStackFrames(includeSymbolication: boolean): Promise<void>;
private generateSymbolicationMap;
private convertHexToUuid;
private addSourceRequest;
private readSourceCode;
private getSourceCodeInformation;
private isCallingModule;
}
export {};