microsoft/vscode-react-native

Public

mirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
2a8515bcb965741df5e6ae40a80e491a19ed4d34

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/common/nestedError.ts

17lines · 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
14 public get extras(): any {
15 return this._extras;
16 }
17}