Download scripts/ErrorException.js from K1Z3M1112/creator: direct link, hf CLI and curl.
- Browser
- Download file 743 Bytes
-
https://huggingface.co/spaces/K1Z3M1112/creator/resolve/main/scripts/ErrorException.js
- Command line
-
hf download hf://spaces/K1Z3M1112/creator/scripts/ErrorException.js
-
curl -L -o ErrorException.js https://huggingface.co/spaces/K1Z3M1112/creator/resolve/main/scripts/ErrorException.js
743 Bytes
| /** | |
| * Author: Peter Dragicevic [peter@petschko.org] | |
| * Authors-Website: http://petschko.org/ | |
| * Date: 04.04.2017 | |
| * Time: 20:23 | |
| */ | |
| /** | |
| * Creates a new ErrorException | |
| * | |
| * @param {string} message - Exception-Message | |
| * @param {int|undefined|null} code - Exception-Error-Code | |
| * @constructor - ErrorException | |
| */ | |
| function ErrorException(message, code) { | |
| if(code === undefined || code === null || isNaN(code)) | |
| code = 0; | |
| this.name = 'ErrorException'; | |
| this.message = message; | |
| this.code = code; | |
| /** | |
| * Returns the Exception as String | |
| * | |
| * @returns {string} - Exception as String | |
| */ | |
| this.toString = function() { | |
| return this.name + ': (' + html(lang.strings['exception.errorCode']) + ' ' + this.code + ') ' + this.message; | |
| } | |
| } | |