Skip to content

Commit 76589d6

Browse files
trflynn89awesomekling
authored andcommitted
LibJS: Change wording of ErrorType::NotA to be independent of context
Currently, we have NotA and NotAn, to be used dependent on whether the following word begins with a vowel or not. To avoid this, change the wording on NotA to be independent of this context.
1 parent 0398089 commit 76589d6

File tree

169 files changed

+171
-171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+171
-171
lines changed

Userland/Libraries/LibJS/Runtime/ErrorTypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
M(JsonMalformed, "Malformed JSON string") \
5858
M(NegativeExponent, "Exponent must be positive") \
5959
M(NonExtensibleDefine, "Cannot define property {} on non-extensible object") \
60-
M(NotA, "Not a {} object") \
60+
M(NotA, "Not an object of type {}") \
6161
M(NotAConstructor, "{} is not a constructor") \
6262
M(NotAFunction, "{} is not a function") \
6363
M(NotAFunctionNoParam, "Not a function") \

Userland/Libraries/LibJS/Tests/builtins/BigInt/BigInt.prototype.toLocaleString.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ test("basic functionality", () => {
66
test("calling with non-BigInt |this|", () => {
77
expect(() => {
88
BigInt.prototype.toLocaleString.call("foo");
9-
}).toThrowWithMessage(TypeError, "Not a BigInt object");
9+
}).toThrowWithMessage(TypeError, "Not an object of type BigInt");
1010
});

Userland/Libraries/LibJS/Tests/builtins/BigInt/BigInt.prototype.toString.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ test("basic functionality", () => {
66
test("calling with non-BigInt |this|", () => {
77
expect(() => {
88
BigInt.prototype.toString.call("foo");
9-
}).toThrowWithMessage(TypeError, "Not a BigInt object");
9+
}).toThrowWithMessage(TypeError, "Not an object of type BigInt");
1010
});

Userland/Libraries/LibJS/Tests/builtins/BigInt/BigInt.prototype.valueOf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ test("basic functionality", () => {
77
test("calling with non-BigInt |this|", () => {
88
expect(() => {
99
BigInt.prototype.valueOf.call("foo");
10-
}).toThrowWithMessage(TypeError, "Not a BigInt object");
10+
}).toThrowWithMessage(TypeError, "Not an object of type BigInt");
1111
});

Userland/Libraries/LibJS/Tests/builtins/Boolean/Boolean.prototype.toString.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ test("basic functionality", () => {
1313
test("errors on non-boolean |this|", () => {
1414
expect(() => {
1515
Boolean.prototype.toString.call("foo");
16-
}).toThrowWithMessage(TypeError, "Not a Boolean object");
16+
}).toThrowWithMessage(TypeError, "Not an object of type Boolean");
1717
});

Userland/Libraries/LibJS/Tests/builtins/Boolean/Boolean.prototype.valueOf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ test("basic functionality", () => {
1212
test("errors on non-boolean |this|", () => {
1313
expect(() => {
1414
Boolean.prototype.valueOf.call("foo");
15-
}).toThrowWithMessage(TypeError, "Not a Boolean object");
15+
}).toThrowWithMessage(TypeError, "Not an object of type Boolean");
1616
});

Userland/Libraries/LibJS/Tests/builtins/Date/Date.prototype.toTemporalInstant.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ describe("errors", () => {
1010
test("this value must be a Date object", () => {
1111
expect(() => {
1212
Date.prototype.toTemporalInstant.call(123);
13-
}).toThrowWithMessage(TypeError, "Not a Date object");
13+
}).toThrowWithMessage(TypeError, "Not an object of type Date");
1414
});
1515
});

Userland/Libraries/LibJS/Tests/builtins/Function/Function.prototype.bind.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,6 @@ describe("errors", () => {
144144
test("does not accept non-function values", () => {
145145
expect(() => {
146146
Function.prototype.bind.call("foo");
147-
}).toThrowWithMessage(TypeError, "Not a Function object");
147+
}).toThrowWithMessage(TypeError, "Not an object of type Function");
148148
});
149149
});

Userland/Libraries/LibJS/Tests/builtins/Intl/ListFormat/ListFormat.prototype.format.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ describe("errors", () => {
44
test("called on non-ListFormat object", () => {
55
expect(() => {
66
Intl.ListFormat.prototype.format([]);
7-
}).toThrowWithMessage(TypeError, "Not a Intl.ListFormat object");
7+
}).toThrowWithMessage(TypeError, "Not an object of type Intl.ListFormat");
88
});
99

1010
test("called with non-string iterable", () => {

Userland/Libraries/LibJS/Tests/builtins/Intl/ListFormat/ListFormat.prototype.formatToParts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ describe("errors", () => {
44
test("called on non-ListFormat object", () => {
55
expect(() => {
66
Intl.ListFormat.prototype.formatToParts([]);
7-
}).toThrowWithMessage(TypeError, "Not a Intl.ListFormat object");
7+
}).toThrowWithMessage(TypeError, "Not an object of type Intl.ListFormat");
88
});
99

1010
test("called with non-string iterable", () => {

0 commit comments

Comments
 (0)