UNPKG

bs-ajv

Version:

BucklesScript bindings to Ajv (Another JSON Validator)

58 lines (47 loc) 1.41 kB
'use strict'; define(["exports", "./caml_exceptions.js"], function(exports, Caml_exceptions){ 'use strict'; var $$Error = Caml_exceptions.create("Js_exn.Error"); function internalToOCamlException(e) { if (Caml_exceptions.isCamlExceptionOrOpenVariant(e)) { return e; } else { return [ $$Error, e ]; } } function raiseError(str) { throw new Error(str); } function raiseEvalError(str) { throw new EvalError(str); } function raiseRangeError(str) { throw new RangeError(str); } function raiseReferenceError(str) { throw new ReferenceError(str); } function raiseSyntaxError(str) { throw new SyntaxError(str); } function raiseTypeError(str) { throw new TypeError(str); } function raiseUriError(str) { throw new URIError(str); } exports.$$Error = $$Error; exports.internalToOCamlException = internalToOCamlException; exports.raiseError = raiseError; exports.raiseEvalError = raiseEvalError; exports.raiseRangeError = raiseRangeError; exports.raiseReferenceError = raiseReferenceError; exports.raiseSyntaxError = raiseSyntaxError; exports.raiseTypeError = raiseTypeError; exports.raiseUriError = raiseUriError; }) /* No side effect */