├── .eslintrc ├── .github └── workflows │ ├── nodejs.yml │ └── release.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── agent.js ├── app.js ├── config └── config.default.js ├── lib ├── error_view.js ├── onerror_page.mustache └── utils.js ├── package.json └── test ├── fixtures ├── agent-error │ ├── agent.js │ └── package.json ├── custom-listener-onerror │ ├── app │ │ └── router.js │ ├── config │ │ └── config.default.js │ └── package.json ├── mock-test-error │ └── package.json ├── onerror-4xx │ ├── app │ │ ├── controller │ │ │ ├── home.js │ │ │ └── user.js │ │ └── router.js │ ├── config │ │ └── config.default.js │ └── package.json ├── onerror-ctx-error │ ├── app │ │ ├── extend │ │ │ └── context.js │ │ └── middleware │ │ │ └── trigger.js │ ├── config │ │ └── config.default.js │ └── package.json ├── onerror-custom-500 │ ├── app │ │ └── router.js │ ├── config │ │ └── config.default.js │ └── package.json ├── onerror-custom-template │ ├── app │ │ ├── controller │ │ │ ├── home.js │ │ │ └── user.js │ │ └── router.js │ ├── config │ │ └── config.default.js │ ├── package.json │ └── template.mustache ├── onerror-customize │ ├── app │ │ ├── controller │ │ │ ├── home.js │ │ │ └── user.js │ │ └── router.js │ ├── config │ │ └── config.default.js │ └── package.json ├── onerror-no-errorpage │ ├── app │ │ ├── controller │ │ │ ├── home.js │ │ │ └── user.js │ │ └── router.js │ ├── config │ │ └── config.default.js │ └── package.json └── onerror │ ├── app │ ├── controller │ │ ├── home.js │ │ └── user.js │ └── router.js │ ├── config │ └── config.default.js │ └── package.json └── onerror.test.js /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-egg" 3 | } 4 | -------------------------------------------------------------------------------- /.github/workflows/nodejs.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/.github/workflows/nodejs.yml -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/.github/workflows/release.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | logs/ 2 | npm-debug.log 3 | node_modules/ 4 | coverage/ 5 | run/ 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/README.md -------------------------------------------------------------------------------- /agent.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/agent.js -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/app.js -------------------------------------------------------------------------------- /config/config.default.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/config/config.default.js -------------------------------------------------------------------------------- /lib/error_view.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/lib/error_view.js -------------------------------------------------------------------------------- /lib/onerror_page.mustache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/lib/onerror_page.mustache -------------------------------------------------------------------------------- /lib/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/lib/utils.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/package.json -------------------------------------------------------------------------------- /test/fixtures/agent-error/agent.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/agent-error/agent.js -------------------------------------------------------------------------------- /test/fixtures/agent-error/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "agent-error" 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/custom-listener-onerror/app/router.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/custom-listener-onerror/app/router.js -------------------------------------------------------------------------------- /test/fixtures/custom-listener-onerror/config/config.default.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/custom-listener-onerror/config/config.default.js -------------------------------------------------------------------------------- /test/fixtures/custom-listener-onerror/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "custom-listener-onerror" 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/mock-test-error/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mock-test-error" 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/onerror-4xx/app/controller/home.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-4xx/app/controller/home.js -------------------------------------------------------------------------------- /test/fixtures/onerror-4xx/app/controller/user.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-4xx/app/controller/user.js -------------------------------------------------------------------------------- /test/fixtures/onerror-4xx/app/router.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-4xx/app/router.js -------------------------------------------------------------------------------- /test/fixtures/onerror-4xx/config/config.default.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-4xx/config/config.default.js -------------------------------------------------------------------------------- /test/fixtures/onerror-4xx/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "onerror-4xx" 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/onerror-ctx-error/app/extend/context.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-ctx-error/app/extend/context.js -------------------------------------------------------------------------------- /test/fixtures/onerror-ctx-error/app/middleware/trigger.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-ctx-error/app/middleware/trigger.js -------------------------------------------------------------------------------- /test/fixtures/onerror-ctx-error/config/config.default.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-ctx-error/config/config.default.js -------------------------------------------------------------------------------- /test/fixtures/onerror-ctx-error/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-ctx-error/package.json -------------------------------------------------------------------------------- /test/fixtures/onerror-custom-500/app/router.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-custom-500/app/router.js -------------------------------------------------------------------------------- /test/fixtures/onerror-custom-500/config/config.default.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-custom-500/config/config.default.js -------------------------------------------------------------------------------- /test/fixtures/onerror-custom-500/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "onerror-custom-500" 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/onerror-custom-template/app/controller/home.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-custom-template/app/controller/home.js -------------------------------------------------------------------------------- /test/fixtures/onerror-custom-template/app/controller/user.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-custom-template/app/controller/user.js -------------------------------------------------------------------------------- /test/fixtures/onerror-custom-template/app/router.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-custom-template/app/router.js -------------------------------------------------------------------------------- /test/fixtures/onerror-custom-template/config/config.default.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-custom-template/config/config.default.js -------------------------------------------------------------------------------- /test/fixtures/onerror-custom-template/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "onerror-customize-template" 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/onerror-custom-template/template.mustache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-custom-template/template.mustache -------------------------------------------------------------------------------- /test/fixtures/onerror-customize/app/controller/home.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-customize/app/controller/home.js -------------------------------------------------------------------------------- /test/fixtures/onerror-customize/app/controller/user.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-customize/app/controller/user.js -------------------------------------------------------------------------------- /test/fixtures/onerror-customize/app/router.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-customize/app/router.js -------------------------------------------------------------------------------- /test/fixtures/onerror-customize/config/config.default.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-customize/config/config.default.js -------------------------------------------------------------------------------- /test/fixtures/onerror-customize/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "onerror-customize" 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/onerror-no-errorpage/app/controller/home.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-no-errorpage/app/controller/home.js -------------------------------------------------------------------------------- /test/fixtures/onerror-no-errorpage/app/controller/user.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-no-errorpage/app/controller/user.js -------------------------------------------------------------------------------- /test/fixtures/onerror-no-errorpage/app/router.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-no-errorpage/app/router.js -------------------------------------------------------------------------------- /test/fixtures/onerror-no-errorpage/config/config.default.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-no-errorpage/config/config.default.js -------------------------------------------------------------------------------- /test/fixtures/onerror-no-errorpage/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror-no-errorpage/package.json -------------------------------------------------------------------------------- /test/fixtures/onerror/app/controller/home.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror/app/controller/home.js -------------------------------------------------------------------------------- /test/fixtures/onerror/app/controller/user.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror/app/controller/user.js -------------------------------------------------------------------------------- /test/fixtures/onerror/app/router.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror/app/router.js -------------------------------------------------------------------------------- /test/fixtures/onerror/config/config.default.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/fixtures/onerror/config/config.default.js -------------------------------------------------------------------------------- /test/fixtures/onerror/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "onerror" 3 | } 4 | -------------------------------------------------------------------------------- /test/onerror.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eggjs/onerror/HEAD/test/onerror.test.js --------------------------------------------------------------------------------