mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-17 18:57:10 +00:00
Node.js: Fix tense in error messages produced when exceptions are throw
At this point the exception _was_ thrown.
This commit is contained in:
parent
5c612cda61
commit
fdec55cd47
2 changed files with 4 additions and 4 deletions
|
|
@ -55,7 +55,7 @@ pub fn invoke_from_event_loop(env: Env, callback: JsFunction) -> napi::Result<na
|
||||||
i_slint_core::api::invoke_from_event_loop(move || {
|
i_slint_core::api::invoke_from_event_loop(move || {
|
||||||
let function_ref = function_ref.take();
|
let function_ref = function_ref.take();
|
||||||
let Ok(callback) = function_ref.get::<JsFunction>() else {
|
let Ok(callback) = function_ref.get::<JsFunction>() else {
|
||||||
eprintln!("Node.js: JavaScript invoke_from_event_loop throws an exception");
|
eprintln!("Node.js: JavaScript invoke_from_event_loop threw an exception");
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
callback.call_without_args(None).ok();
|
callback.call_without_args(None).ok();
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ impl Model for JsModel {
|
||||||
|
|
||||||
fn row_count(&self) -> usize {
|
fn row_count(&self) -> usize {
|
||||||
let Ok(model) = self.js_impl.get::<Object>() else {
|
let Ok(model) = self.js_impl.get::<Object>() else {
|
||||||
eprintln!("Node.js: JavaScript Model<T>'s rowCount throws an exception");
|
eprintln!("Node.js: JavaScript Model<T>'s rowCount threw an exception");
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -125,7 +125,7 @@ impl Model for JsModel {
|
||||||
|
|
||||||
fn row_data(&self, row: usize) -> Option<Self::Data> {
|
fn row_data(&self, row: usize) -> Option<Self::Data> {
|
||||||
let Ok(model) = self.js_impl.get::<Object>() else {
|
let Ok(model) = self.js_impl.get::<Object>() else {
|
||||||
eprintln!("Node.js: JavaScript Model<T>'s rowData throws an exception");
|
eprintln!("Node.js: JavaScript Model<T>'s rowData threw an exception");
|
||||||
return None;
|
return None;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -160,7 +160,7 @@ impl Model for JsModel {
|
||||||
|
|
||||||
fn set_row_data(&self, row: usize, data: Self::Data) {
|
fn set_row_data(&self, row: usize, data: Self::Data) {
|
||||||
let Ok(model) = self.js_impl.get::<Object>() else {
|
let Ok(model) = self.js_impl.get::<Object>() else {
|
||||||
eprintln!("Node.js: JavaScript Model<T>'s setRowData throws an exception");
|
eprintln!("Node.js: JavaScript Model<T>'s setRowData threw an exception");
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue