Empty catch blocks fail to compile unless they're at the end of a file with the very unhelpful failure message "error: : invalid expression"
Numbered Steps to Reproduce Problem:
1. Make try/catch block at the end of a file with nothing in the catch, try to compile
2. Add something else later in the file, try to compile
3. Add anything in the catch block, try to compile
Code Snippet (if applicable) to Reproduce Problem:
/proc/throw_error() //compiles
try
throw EXCEPTION("single")
catch
/proc/throw_error() //doesnt compile
try
throw EXCEPTION("single")
catch
/world/Error()
return
/proc/throw_error() //compiles
try
throw EXCEPTION("single")
catch .
/world/Error()
return
Expected Results:
Successful compile every time
Actual Results:
A compile failure in a case the documentation is very clear on being valid
Does the problem occur:
Every time? Or how often?
Errytime
In other games?
In other user accounts?
On other computers?
Not tested since I only have myself.
When does the problem NOT occur?
When the catch block has no code following it afterwards or has any code inside itself, even a .
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Workarounds:
Do something useless in the catch or make sure the catch is at the end of the file.