Skip to main content
Module

x/drash/tests/deps.ts>Drash.ErrorHandler#catch

A microframework for Deno's HTTP server with zero third-party dependencies
Go to Latest
method Drash.ErrorHandler.prototype.catch
import { Drash } from "https://deno.land/x/drash@v2.7.0/tests/deps.ts";
const { ErrorHandler } = Drash;

Catch and handle the given error.

Parameters

error: Error
  • The Error object that is thrown during runtime.
_request: Request
  • The original request that threw the error. Note this is not that Drash.Request object. Reason being, the Drash.Request object can also throw an error and would not be available as a parameter.
response: Response
  • The Drash.Response object.
_connInfo: ConnInfo