# All files / src/js Relude_Js_Exn.bs.js

45.45% Statements 5/11
0% Branches 0/2
25% Functions 1/4
50% Lines 5/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22

    17x

    2x

    17x
    17x
    17x

     'use strict';

    var Js_exn = require("bs-platform/lib/js/js_exn.js");

    function make (message){ return new Error(message);  };

    function $$throw (message){ throw new Error(message); };

    function unsafeFromExn(exn) {
      var makeUnknownJsExn = function (exn){ return new Error("Unexpected error: " + exn); };
      if (exn[0] === Js_exn.$$Error) {
        return exn[1];
      } else {
        return makeUnknownJsExn(exn);
      }
    }

    exports.make = make;
    exports.$$throw = $$throw;
    exports.unsafeFromExn = unsafeFromExn;
    /* No side effect */