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:
parent
a3bd1ba26d
commit
977f8137f3
1 changed files with 3 additions and 3 deletions
|
@ -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,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue