# oak_exception **Repository Path**: JiQingYun/oak_exception ## Basic Information - **Project Name**: oak_exception - **Description**: A global exception filter middleware by oak. - **Primary Language**: TypeScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-11-29 - **Last Updated**: 2021-11-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # oak_exception [![Deno](https://github.com/jiawei397/oak_exception/actions/workflows/deno.yml/badge.svg)](https://github.com/jiawei397/oak_exception/actions/workflows/deno.yml) A global exception filter middleware by oak. ## Example ```typescript import { anyExceptionFilter } from "https://deno.land/x/oak_exception@v0.0.6/mod.ts"; import { Application } from "https://deno.land/x/oak@v10.0.0/mod.ts"; const app = new Application(); app.use(anyExceptionFilter()); // other middleware app.use((ctx) => { throw new Error("500"); ctx.response.body = "Hello World!"; }); console.log("app started with: http://localhost"); await app.listen(":80"); ```