finished try/catch

This commit is contained in:
afonya 2025-06-18 14:21:31 +02:00
parent 3dd28cedd3
commit 6fe9395817
Signed by: afonya
GPG key ID: EBB9C4CAFAAFB2DC
5 changed files with 424 additions and 99 deletions

View file

@ -54,7 +54,7 @@ pub struct ASLError {
pub code: String,
}
fn convert_types_to_string(typ: &ErrorType) -> String {
pub fn convert_types_to_string(typ: &ErrorType) -> String {
match typ {
ErrorType::SyntaxError => String::from("Syntax Error: "),
ErrorType::TypeError => String::from("Type Error: "),
@ -85,7 +85,7 @@ pub fn reverse_type_short(str: String) -> ErrorType {
_ => panic!("Unknown error type short: {}", str),
}
}
fn convert_subtypes_to_string(stype: &ErrorSubType) -> String {
pub fn convert_subtypes_to_string(stype: &ErrorSubType) -> String {
match stype {
ErrorSubType::UnexpectedEnd => String::from("Unexpected end"),
ErrorSubType::UnexpectedOperation => String::from("Unexpected operation"),