mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-14 07:57:57 -05:00
Error builtin
This commit is contained in:
@@ -4,6 +4,7 @@ use valuescript_common::InstructionByte;
|
||||
|
||||
use crate::bytecode_decoder::BytecodeDecoder;
|
||||
use crate::bytecode_decoder::BytecodeType;
|
||||
use crate::format_val;
|
||||
use crate::operations;
|
||||
use crate::stack_frame::FrameStepOk;
|
||||
use crate::stack_frame::FrameStepResult;
|
||||
@@ -348,7 +349,7 @@ impl StackFrameTrait for BytecodeStackFrame {
|
||||
.decoder
|
||||
.decode_val(&self.registers)
|
||||
.as_class_data()
|
||||
.expect("Not implemented: throw exception (not constructible)");
|
||||
.ok_or(format_val!("TypeError: value is not a constructor"))?;
|
||||
|
||||
let mut instance = Val::Object(Rc::new(VsObject {
|
||||
string_map: Default::default(),
|
||||
|
||||
Reference in New Issue
Block a user