finished try/catch
This commit is contained in:
parent
3dd28cedd3
commit
6fe9395817
5 changed files with 424 additions and 99 deletions
|
@ -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"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue