mirror of
https://github.com/sern-handler/handler
synced 2026-06-19 06:12:13 +00:00
revert removal of crash method and mark deprecated
This commit is contained in:
@@ -7,6 +7,11 @@ export interface ErrorHandling {
|
||||
*/
|
||||
keepAlive: number;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Version 4 will remove this method
|
||||
*/
|
||||
crash(err :Error) : never
|
||||
/**
|
||||
* A function that is called on every crash. Updates keepAlive.
|
||||
* If keepAlive is 0, the process crashes.
|
||||
|
||||
@@ -6,6 +6,10 @@ import { ErrorHandling } from '../../contracts';
|
||||
* Version 4.0.0 will internalize this api. Please refrain from using ModuleStore!
|
||||
*/
|
||||
export class DefaultErrorHandling implements ErrorHandling {
|
||||
|
||||
crash(err: Error): never {
|
||||
throw err;
|
||||
}
|
||||
|
||||
keepAlive = 5;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { CommandType } from '../enums';
|
||||
/**
|
||||
* @internal
|
||||
* @since 2.0.0
|
||||
* Version 4.0.0 will internalize this api. Please refrain from using ModuleStore!
|
||||
* Version 4.0.0 will internalize this api. Please refrain from using DefaultModuleManager!
|
||||
*/
|
||||
export class DefaultModuleManager implements ModuleManager {
|
||||
constructor(private moduleStore: CoreModuleStore) {}
|
||||
|
||||
Reference in New Issue
Block a user