koatty_exception
Advanced tools
Comparing version 1.3.0-1 to 1.3.0-2
@@ -5,2 +5,9 @@ # Changelog | ||
## [1.3.0-2](https://github.com/koatty/koatty_exception/compare/v1.3.0-1...v1.3.0-2) (2024-01-21) | ||
### Bug Fixes | ||
* 支持链式调用 ([5efdfe0](https://github.com/koatty/koatty_exception/commit/5efdfe07d16d9474f100f3b9465a342ee7a69abc)) | ||
## [1.3.0-1](https://github.com/koatty/koatty_exception/compare/v1.2.8...v1.3.0-1) (2024-01-21) | ||
@@ -7,0 +14,0 @@ |
/*! | ||
* @Author: richen | ||
* @Date: 2024-01-21 12:13:34 | ||
* @Date: 2024-01-21 12:20:52 | ||
* @License: BSD (3-Clause) | ||
@@ -33,7 +33,7 @@ * @Copyright (c) - <richenlin(at)gmail.com> | ||
constructor(message: string, code?: number, status?: number, stack?: string, span?: Span); | ||
setStatus(status: number): void; | ||
setMessage(message: string): void; | ||
setCode(code: number): void; | ||
setStack(stack: string): void; | ||
setSpan(span: Span): void; | ||
setStatus(status: number): this; | ||
setMessage(message: string): this; | ||
setCode(code: number): this; | ||
setStack(stack: string): this; | ||
setSpan(span: Span): this; | ||
/** | ||
@@ -40,0 +40,0 @@ * Default exception handler |
/*! | ||
* @Author: richen | ||
* @Date: 2024-01-21 12:13:24 | ||
* @Date: 2024-01-21 12:20:43 | ||
* @License: BSD (3-Clause) | ||
@@ -662,15 +662,30 @@ * @Copyright (c) - <richenlin(at)gmail.com> | ||
setStatus(status) { | ||
this.status = status; | ||
if (status >= 100 && status < 600) { | ||
this.status = status; | ||
} | ||
return this; | ||
} | ||
setMessage(message) { | ||
this.message = message; | ||
if (message) { | ||
this.message = message; | ||
} | ||
return this; | ||
} | ||
setCode(code) { | ||
this.code = code; | ||
if (Helper.Helper.isNumber(code)) { | ||
this.code = code; | ||
} | ||
return this; | ||
} | ||
setStack(stack) { | ||
this.stack = stack; | ||
if (stack) { | ||
this.stack = stack; | ||
} | ||
return this; | ||
} | ||
setSpan(span) { | ||
this.span = span; | ||
if (span) { | ||
this.span = span; | ||
} | ||
return this; | ||
} | ||
@@ -677,0 +692,0 @@ /** |
{ | ||
"name": "koatty_exception", | ||
"version": "1.3.0-1", | ||
"version": "1.3.0-2", | ||
"description": "Exception handler for koatty.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
{ | ||
"name": "koatty_exception", | ||
"version": "1.3.0-1", | ||
"version": "1.3.0-2", | ||
"description": "Exception handler for koatty.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97645
2067