-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created loading error handling file for further work on that, i.e. di…
…splaying no internet screen or certificate error screen
- Loading branch information
Enrike Churin
committed
Aug 6, 2022
1 parent
9ba3353
commit cf69a9b
Showing
5 changed files
with
40 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
export function LoadingError(code: number, desc: string, url: string, displayError: (code: number, desc: string) => void): void { | ||
console.log('Failed loading the page, with the code:') | ||
console.log(code) | ||
console.log('Description:') | ||
console.log(desc) | ||
console.log('Failed URL:') | ||
console.log(url) | ||
console.log('') | ||
|
||
switch (code) { | ||
case -3: | ||
|
||
break | ||
|
||
case -106: | ||
displayError(code, desc) | ||
break | ||
|
||
default: | ||
break | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// TODO: Add a contextmenu |