ID:1869108
 
Resolved
Empty catch statements usually didn't compile correctly.
BYOND Version:508
Operating System:Windows 7 Home Basic 64-bit
Web Browser:Chrome 42.0.2311.135
Applies to:Dream Maker
Status: Resolved (508.1288)

This issue has been resolved.
Descriptive Problem Summary:
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.
Lummox JR resolved issue with message:
Empty catch statements usually didn't compile correctly.