Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 18.188.73.229
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
wb /
node_modules /
type /
test /
lib /
Delete
Unzip
Name
Size
Permission
Date
Action
is-to-string-tag-supported.js
310
B
-rw-rw-r--
2022-08-30 11:49
resolve-exception.js
1.28
KB
-rw-rw-r--
2022-08-30 11:49
safe-to-string.js
1.17
KB
-rw-rw-r--
2022-08-30 11:49
to-short-string.js
1.53
KB
-rw-rw-r--
2022-08-30 11:49
Save
Rename
"use strict"; var assert = require("chai").assert , handleException = require("../../lib/resolve-exception"); describe("lib/handle-exception", function () { it("Should throw TypeError", function () { try { handleException(12, "Invalid value"); throw new Error("Unexpected"); } catch (error) { assert.equal(error.name, "TypeError"); assert.equal(error.message, "Invalid value"); } }); it("Should resolve value in default message", function () { try { handleException(12, "%v is invalid", {}); throw new Error("Unexpected"); } catch (error) { assert.equal(error.message, "12 is invalid"); } }); it("Should support optional values via inputOptions.isOptional", function () { assert.equal(handleException(null, "%v is invalid", { isOptional: true }, null)); }); it("Should support optional values via inputOptions.default", function () { // prettier-ignore assert.equal(handleException(null, "%v is invalid", { "default": "bar" }), "bar"); }); it("Should support custome error message via inputOptions.errorMessage", function () { try { handleException(null, "%v is invalid", { errorMessage: "%v is not supported age" }); throw new Error("Unexpected"); } catch (error) { assert.equal(error.message, "null is not supported age"); } }); });