luaur_require/methods/
runtime_error_handler_runtime_error_handler.rs1use crate::records::runtime_error_handler::RuntimeErrorHandler;
2
3impl RuntimeErrorHandler {
4 pub fn new(required_path: alloc::string::String) -> Self {
5 let mut error_prefix = alloc::string::String::from("error requiring module \"");
6 error_prefix.push_str(&required_path);
7 error_prefix.push_str("\": ");
8
9 Self {
10 error_prefix,
11 error_message: alloc::string::String::new(),
12 }
13 }
14}
15
16#[allow(non_snake_case)]
17pub fn runtime_error_handler_runtime_error_handler(
18 required_path: alloc::string::String,
19) -> RuntimeErrorHandler {
20 RuntimeErrorHandler::new(required_path)
21}