added hcl_seterrbfmtloc() and hcl_seterrufmtloc()
All checks were successful
continuous-integration/drone/push Build is passing

added the errloc field to hcl_t to capture the exception location
This commit is contained in:
2024-04-05 01:26:02 +09:00
parent 4be0299de3
commit b91e48d2a1
5 changed files with 105 additions and 23 deletions

View File

@ -25,15 +25,29 @@ defclass X :: B | a b | {
---
defclass X {
defun :* xxx() {
return X;
}
defun :* qqq() {
return "hello"
}
defun :* xxx() {
return X;
}
defun :* qqq() {
return "hello"
}
defun String:length() { ##ERROR: syntax error - function name not valid
return (str.length self)
}
defun String:length() { ##ERROR: syntax error - function name not valid
return (str.length self)
}
}
---
defclass X {
defun :* xxx() {
return X;
}
defun :* qqq() {
return "hello"
}
}
## this will trigger a runtime error as J isn't a class name
defun J:ccc() { ##ERROR: exception not handled
return 999
}