forked from firefox-devtools/profiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.js
23 lines (19 loc) · 779 Bytes
/
errors.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* 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/. */
// @flow
import type { RequestedLib } from '../types/actions';
// Used during the symbolication process to express that we couldn't find
// symbols for a specific library
export class SymbolsNotFoundError extends Error {
library: RequestedLib;
error: ?Error;
constructor(message: string, library: RequestedLib, error?: Error) {
super(message);
// Workaround for a babel issue when extending Errors
(this: any).__proto__ = SymbolsNotFoundError.prototype;
this.name = 'SymbolsNotFoundError';
this.library = library;
this.error = error;
}
}