-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1785 from okTurtles/e2e-protocol-ricardo
E2e protocol ricardo
- Loading branch information
Showing
25 changed files
with
993 additions
and
673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,10 @@ | ||
'use strict' | ||
|
||
export class GIErrorIgnoreAndBan extends Error { | ||
// ugly boilerplate because JavaScript is stupid | ||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Custom_Error_Types | ||
constructor (...params: any[]) { | ||
super(...params) | ||
this.name = 'GIErrorIgnoreAndBan' | ||
if (Error.captureStackTrace) { | ||
Error.captureStackTrace(this, this.constructor) | ||
} | ||
} | ||
} | ||
import { ChelErrorGenerator } from '~/shared/domains/chelonia/errors.js' | ||
|
||
export const GIErrorIgnoreAndBan: typeof Error = ChelErrorGenerator('GIErrorIgnoreAndBan') | ||
|
||
// Used to throw human readable errors on UI. | ||
export class GIErrorUIRuntimeError extends Error { | ||
constructor (...params: any[]) { | ||
super(...params) | ||
// this.name = this.constructor.name | ||
this.name = 'GIErrorUIRuntimeError' // string literal so minifier doesn't overwrite | ||
if (Error.captureStackTrace) { | ||
Error.captureStackTrace(this, this.constructor) | ||
} | ||
} | ||
} | ||
export const GIErrorUIRuntimeError: typeof Error = ChelErrorGenerator('GIErrorUIRuntimeError') | ||
|
||
export const GIErrorMissingSigningKeyError: typeof Error = ChelErrorGenerator('GIErrorMissingSigningKeyError') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.