1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

refactor(ext/console): align error messages (#25301)

Aligns the error messages in the console extension to be in-line with
the Deno style guide.

https://github.com/denoland/deno/issues/25269
This commit is contained in:
Ian Bull 2024-09-02 07:28:17 -07:00 committed by GitHub
parent a3bd1ba26d
commit 977f8137f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -179,7 +179,7 @@ class AssertionError extends Error {
} }
} }
function assert(cond, msg = "Assertion failed.") { function assert(cond, msg = "Assertion failed") {
if (!cond) { if (!cond) {
throw new AssertionError(msg); throw new AssertionError(msg);
} }
@ -3236,8 +3236,8 @@ class Console {
table = (data = undefined, properties = undefined) => { table = (data = undefined, properties = undefined) => {
if (properties !== undefined && !ArrayIsArray(properties)) { if (properties !== undefined && !ArrayIsArray(properties)) {
throw new Error( throw new Error(
"The 'properties' argument must be of type Array. " + "The 'properties' argument must be of type Array: " +
"Received type " + typeof properties, "received type " + typeof properties,
); );
} }