microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
3c2eeb5c9c12252cabd328afa31e79f80b5dd394

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/common/nestedError.ts

11lines · modepreview

export class NestedError extends Error {
    private innerError: Error | any; // Normally this should be an error, but we support any value

    constructor(message: string, innerError: any) {
        super(message);
        this.innerError = innerError;
        this.name = innerError.name;
        const innerMessage = innerError.message;
        this.message = innerMessage ? `${message}: ${innerMessage}` : message;
    }
}