Closed angelcaru closed 4 months ago
This should also accept just function name. Ex. raise somefile.TypeError
without ()
.
It would be nice to get like this:
Radiation (most recent call last):
File ./test_lib.rn, line 3
TypeError
raise rlib.TypeError
^^^^^^^^^^^^^^
if called rlib.TypeError
this only. no arguments and no default will be executed while no ()
.
What, like this?
TypeError = "type error"
raise TypeError
instead of
fun TypeError() {
return "type error"
}
raise TypeError
What, like this?
TypeError = "type error" raise TypeError
instead of
fun TypeError() { return "type error" } raise TypeError
Radiation (most recent call last):
File ./test_lib.rn, line 6, in <program>
RuntimeError: Illegal operation for ("type error", "type error")
raise TypeError
^^^^^^^^^
OK, now I'm even more confused
So if the function returns null
don't print a message? So
fun TypeError() {
return "type error"
}
raise TypeError
would give TypeError: type error
, while
fun TypeError() {} # implicitly returns null
raise TypeError
would give TypeError
?
When it is not defined yet, it raise errors 2 times. It could be for the super()
call on error file.
Radiation (most recent call last):
File ./test_lib.rn, line 3, in <program>
Radiation (most recent call last):
File ./test_lib.rn, line 3
RuntimeError: Attribute 'rrError' does not exist
raise rlib.rrError()
^^^^^^^^^^^^
raise rlib.rrError()
^^^^^^^^^^^^
Some times it leaves closing parent on error.
? Can't reproduce
? Can't reproduce
What do you mean?
What is even the issue?
What is even the issue?
Check the last error message on the screenshot.
It looks fine to me...
It missed the closing parenthesis.
That's such a minor thing though. It doesn't really matter
That's such a minor thing though. It doesn't really matter
Well you are right. But this looks weird to me.
We have all sorts of similar issues with error reporting. I don't see a reason why this one specifically needs to block the PR. For instance:
We have all sorts of similar issues with error reporting. I don't see a reason why this one specifically needs to block the PR. For instance:
I am not blocking the PR here. Just wanted to share my opinion on this related topic.
In this case we need to identify this issue with more various perspective and create a new issue linking all found bugs on radiation traceback formatting to fix it.
Closes #137