import { fromErrorEvent } from "https://deno.land/x/ayonli_jsext@v0.9.72/error/index.ts";
Creates an error instance based on the given ErrorEvent
instance.
Examples
Example 1
Example 1
import { fromErrorEvent } from "@ayonli/jsext/error";
const event = new ErrorEvent("error", {
message: "Something went wrong.",
filename: "",
lineno: 1,
colno: 13,
});
const err = fromErrorEvent(event);
console.log(err);
// Error: Something went wrong.
// at <anonymous>:1:13
Parameters
event: ErrorEvent