-
Notifications
You must be signed in to change notification settings - Fork 532
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue #8109 Co-authored-by: paw <paw-hub@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
54 additions
and
10 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,9 +1,18 @@ | ||
//@bundleInto:common-min | ||
|
||
import { TutanotaError } from "@tutao/tutanota-error" | ||
import { filterInt } from "@tutao/tutanota-utils" | ||
|
||
export class SuspensionError extends TutanotaError { | ||
constructor(message: string) { | ||
// milliseconds to wait | ||
readonly data: string | null | ||
constructor(message: string, suspensionTime: string | null) { | ||
super("SuspensionError", message) | ||
|
||
if (suspensionTime != null && Number.isNaN(filterInt(suspensionTime))) { | ||
throw new Error("invalid suspension time value (NaN)") | ||
} | ||
|
||
this.data = suspensionTime | ||
} | ||
} |
Empty file.
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
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