hlvm_runtime/error.rs
1use std::fmt::Debug;
2use std::process::exit;
3
4pub fn throw<T>(s: &str, stack: Vec<T>) where T: Debug {
5 println!("==[ ERROR ]========> {}", s);
6 println!("==[ STACK TRACE ]==> {:?}", stack);
7 exit(1);
8}
9
10pub fn throw_no_stack(s: &str) {
11 println!("==[ ERROR ]========> {}", s);
12 exit(1);
13}