Skip to content

Commit

Permalink
Change wording on valueOf error message
Browse files Browse the repository at this point in the history
  • Loading branch information
nekevss committed Dec 11, 2024
1 parent e2942df commit 21c6976
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion core/engine/src/builtins/temporal/duration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ impl Duration {

pub(crate) fn value_of(_this: &JsValue, _: &[JsValue], _: &mut Context) -> JsResult<JsValue> {
Err(JsNativeError::typ()
.with_message("valueOf not implemented for Temporal objects. See 'compare', 'equals', or `toString`")
.with_message("`valueOf` not supported by Temporal built-ins. See 'compare', 'equals', or `toString`")
.into())
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/temporal/instant/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ impl Instant {

pub(crate) fn value_of(_this: &JsValue, _: &[JsValue], _: &mut Context) -> JsResult<JsValue> {
Err(JsNativeError::typ()
.with_message("valueOf not implemented for Temporal objects. See 'compare', 'equals', or `toString`")
.with_message("`valueOf` not supported by Temporal built-ins. See 'compare', 'equals', or `toString`")
.into())
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/temporal/plain_date/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ impl PlainDate {

pub(crate) fn value_of(_this: &JsValue, _: &[JsValue], _: &mut Context) -> JsResult<JsValue> {
Err(JsNativeError::typ()
.with_message("valueOf not implemented for Temporal objects. See 'compare', 'equals', or `toString`")
.with_message("`valueOf` not supported by Temporal built-ins. See 'compare', 'equals', or `toString`")
.into())
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/temporal/plain_date_time/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ impl PlainDateTime {

pub(crate) fn value_of(_this: &JsValue, _: &[JsValue], _: &mut Context) -> JsResult<JsValue> {
Err(JsNativeError::typ()
.with_message("valueOf not implemented for Temporal objects. See 'compare', 'equals', or `toString`")
.with_message("`valueOf` not supported by Temporal built-ins. See 'compare', 'equals', or `toString`")
.into())
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/temporal/plain_month_day/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl PlainMonthDay {

pub(crate) fn value_of(_this: &JsValue, _: &[JsValue], _: &mut Context) -> JsResult<JsValue> {
Err(JsNativeError::typ()
.with_message("valueOf not implemented for Temporal objects. See 'compare', 'equals', or `toString`")
.with_message("`valueOf` not supported by Temporal built-ins. See 'compare', 'equals', or `toString`")
.into())
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/temporal/plain_time/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ impl PlainTime {
fn value_of(_this: &JsValue, _: &[JsValue], _: &mut Context) -> JsResult<JsValue> {
// 1. Throw a TypeError exception.
Err(JsNativeError::typ()
.with_message("valueOf not implemented for Temporal objects. See 'compare', 'equals', or `toString`")
.with_message("`valueOf` not supported by Temporal built-ins. See 'compare', 'equals', or `toString`")
.into())
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/temporal/plain_year_month/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ impl PlainYearMonth {

pub(crate) fn value_of(_this: &JsValue, _: &[JsValue], _: &mut Context) -> JsResult<JsValue> {
Err(JsNativeError::typ()
.with_message("valueOf not implemented for Temporal objects. See 'compare', 'equals', or `toString`")
.with_message("`valueOf` not supported by Temporal built-ins. See 'compare', 'equals', or `toString`")
.into())
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/temporal/zoneddatetime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ impl ZonedDateTime {

pub(crate) fn value_of(_this: &JsValue, _: &[JsValue], _: &mut Context) -> JsResult<JsValue> {
Err(JsNativeError::typ()
.with_message("valueOf not implemented for Temporal objects. See 'compare', 'equals', or `toString`")
.with_message("`valueOf` not supported by Temporal built-ins. See 'compare', 'equals', or `toString`")
.into())
}
}
Expand Down

0 comments on commit 21c6976

Please sign in to comment.