package melange

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Utilities for dealing with Js exceptions

exception Error of Caml_js_exceptions.t
val asJsExn : exn -> t option
val stack : t -> string option
val message : t -> string option
val name : t -> string option
val fileName : t -> string option
type error
val makeError : string -> error
val isCamlExceptionOrOpenVariant : 'a -> bool
val anyToExnInternal : 'a -> exn
val raiseError : string -> 'a
type eval_error
val makeEvalError : string -> eval_error
val raiseEvalError : string -> 'a
type range_error
val makeRangeError : string -> range_error
val raiseRangeError : string -> 'a
type reference_error
val makeReferenceError : string -> reference_error
val raiseReferenceError : string -> 'a
type syntax_error
val makeSyntaxError : string -> syntax_error
val raiseSyntaxError : string -> 'a
type type_error
val makeTypeError : string -> type_error
val raiseTypeError : string -> 'a
type uri_error
val makeURIError : string -> uri_error
val raiseUriError : string -> 'a

TODO add predicate to tell which error is which

OCaml

Innovation. Community. Security.