openfl
Version:
A fast, productive library for 2D cross-platform development.
55 lines (38 loc) • 1.24 kB
JavaScript
// Class: js._Boot.HaxeError
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
var $hxEnums = require("./../../hxEnums_stub").default;
var $import = require("./../../import_stub").default;
var $extend = require("./../../extend_stub").default;
// Constructor
var HaxeError = function(val) {
Error.call(this);
this.val = val;
if(Error.captureStackTrace) {
Error.captureStackTrace(this,HaxeError);
}
}
// Meta
HaxeError.__name__ = "js._Boot.HaxeError";
HaxeError.__isInterface__ = false;
HaxeError.__super__ = Error;
HaxeError.prototype = $extend(Error.prototype, {
});
HaxeError.prototype.__class__ = HaxeError.prototype.constructor = $hxClasses["js._Boot.HaxeError"] = HaxeError;
// Init
Object.defineProperty(HaxeError.prototype,"message",{ get : function() {
return String(this.val);
}});
// Statics
HaxeError.wrap = function(val) {
if(((val) instanceof Error)) {
return val;
} else {
return new HaxeError(val);
}
}
// Export
exports.default = HaxeError;