mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
Panic on unexpected locals instead of just logging
This commit is contained in:
@@ -117,12 +117,12 @@ impl fmt::Debug for Frame {
|
||||
let local_str = match self.locals.borrow().kind {
|
||||
PyObjectKind::Scope { ref scope } => match scope.locals.borrow().kind {
|
||||
PyObjectKind::Dict { ref elements } => format!(" {:?}", elements),
|
||||
ref unexpected => format!(
|
||||
ref unexpected => panic!(
|
||||
"locals unexpectedly not wrapping a dict! instead: {:?}",
|
||||
unexpected
|
||||
),
|
||||
},
|
||||
ref unexpected => format!("locals unexpectedly not a scope! instead: {:?}", unexpected),
|
||||
ref unexpected => panic!("locals unexpectedly not a scope! instead: {:?}", unexpected),
|
||||
};
|
||||
write!(
|
||||
f,
|
||||
|
||||
Reference in New Issue
Block a user