ID:1898445
 
BYOND Version:508
Operating System:Windows 7 Home Basic 64-bit
Web Browser:Chrome 43.0.2357.134
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:
An exception thrown as the last thing in a file will report its source line and file as the source file's placement in the dme.

Code Snippet (if applicable) to Reproduce Problem:
/mob/verb/exceptional_exception_handling()
throw EXCEPTION("exceptional!")


Expected Results:
runtime error: Exception thrown: exceptional! (/exception)
proc name: exceptional exception handling (/mob/verb/exceptional_exception_handling)
source file: exceptions.dm,2
usr: MisterPerson (/mob)
src: MisterPerson (/mob)
call stack:
MisterPerson (/mob): exceptional exception handling()

Actual Results:
runtime error: Exception thrown: exceptional! (/exception)
proc name: exceptional exception handling (/mob/verb/exceptional_exception_handling)
source file: testing.dme,20
usr: MisterPerson (/mob)
src: MisterPerson (/mob)
call stack:
MisterPerson (/mob): exceptional exception handling()


When does the problem NOT occur?
When the exception isn't the last thing in a file. Even a newline stops this issue.

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.)

I didn't test any.
Curious! I wonder if the same thing happens if you have a regular runtime error there, or if it's just limited to throw.
Only with throw(). Also it's only with throw EXCEPTION(). throw(EXCEPTION()) works correctly.
Well that's truly weird. It must be an artifact of the way I'm parsing it.
throw "text" doesn't even compile, so I'm not sure why throw EXCEPTION() does.