Update examples that use RuntimeError::custom to use return a custom

error type directly.
This commit is contained in:
Amanieu d'Antras
2021-12-20 16:05:47 +01:00
parent c68393abbd
commit 4924a7c22a
6 changed files with 10 additions and 12 deletions

View File

@@ -63,7 +63,7 @@ impl RuntimeError {
}
/// Raises a custom user Error
#[deprecated(since = "2.1.1", note = "prefer using RuntimeError::custom instead")]
#[deprecated(since = "2.1.1", note = "return a Result from host functions instead")]
pub fn raise(error: Box<dyn Error + Send + Sync>) -> ! {
let error = Self::custom(error);
let js_error: JsValue = error.into();