UNPKG

prepack

Version:

Execute a JS bundle, serialize global state and side effects to a snapshot that can be quickly restored.

41 lines (32 loc) 1.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // This is the error format used to report errors to the caller-supplied // error-handler /** * Copyright (c) 2017-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ class CompilerDiagnostic extends Error { constructor(message, location, errorCode, severity) { super(message); this.location = location; this.severity = severity; this.errorCode = errorCode; } } exports.CompilerDiagnostic = CompilerDiagnostic; // This error is thrown to exit Prepack when an ErrorHandler returns 'FatalError' // This should just be a class but Babel classes doesn't work with // built-in super classes. class FatalError extends Error { constructor(message) { super(message || "A fatal error occurred while prepacking."); } } exports.FatalError = FatalError; //# sourceMappingURL=errors.js.map