Follow-up for error messages in core (#2719)

* Fix tests

* Replace unwraps on RuntimeError with panics and add track_caller for better error output

* Convert more unwraps

* Fix git
This commit is contained in:
Matt Hunzinger authored and GitHub committed 2024-07-29 13:15:06 -07:00
1 parent a1dfc4b4f0
commit 6558fd95a2
9 files changed
+39 -17

No files matched your search

+1 -1
View File
@@ -50,7 +50,7 @@ impl VirtualDom {
#[track_caller]
pub(crate) fn run_scope(&mut self, scope_id: ScopeId) -> RenderReturn {
// Ensure we are currently inside a `Runtime`.
crate::Runtime::current().unwrap();
crate::Runtime::current().unwrap_or_else(|e| panic!("{}", e));
self.runtime.clone().with_scope_on_stack(scope_id, || {
let scope = &self.scopes[scope_id.0];