Skip to content

Commit 3cb6ee6

Browse files
committed
Improve error message for method not found
1 parent 8654ceb commit 3cb6ee6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/vm.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2132,7 +2132,11 @@ impl Actor
21322132
Value::Object(p) => {
21332133
let obj = unsafe { &*p };
21342134
let fun_id = match self.get_method(obj.class_id, method_name.as_str()) {
2135-
None => error!("call to method `{}`, not found on class", method_name.as_str()),
2135+
None => error!(
2136+
"call to method `{}`, not found on class `{}`",
2137+
method_name.as_str(),
2138+
self.get_class_name(obj.class_id)
2139+
),
21362140
Some(fun_id) => fun_id,
21372141
};
21382142

0 commit comments

Comments
 (0)