microsoft/vscode-react-native

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
547e1f1e48bd557fdbf059038f42b1c5f48bdfea

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/common/nestedError.ts

13lines · modecode

1export class NestedError extends Error {
2 private innerError: Error | any; // Normally this should be an error, but we support any value
3 private extras: any;
4
5 constructor(message: string, innerError: any, extras?: any) {
6 super(message);
7 this.innerError = innerError;
8 this.name = innerError.name;
9 const innerMessage = innerError.message;
10 this.message = innerMessage ? `${message}: ${innerMessage}` : message;
11 this.extras = extras;
12 }
13}