ID:2185464
 
Resolved
Assignments to undefined vars always printed the error to world.log instead of sending the error message as in a normal exception.
BYOND Version:511.1365
Operating System:Windows 10 Home 64-bit
Web Browser:Chrome 54.0.2840.99
Applies to:Dream Daemon
Status: Resolved (511.1366)

This issue has been resolved.
Code Snippet (if applicable) to Reproduce Problem:
Test Case: http://files.byondhome.com/Kamuna/TestCases/ VariableTestCase_src.zip
/*
These are simple defaults for your project.
*/


world
fps = 25 // 25 frames per second
icon_size = 32 // 32x32 icon size by default

view = 6 // show up to 6 tiles outward from center (13x13 view)


// Make objects move 8 pixels per tick when walking

mob
step_size = 8
verb/Test()
try
usr.vars["variable"] = 10
catch
world << "This happens."

obj
step_size = 8


Expected Results:
No world.log output is displayed. This is for the catch block with exceptions to handle.

Actual Results:
world.log output is displayed: Undefined variable /mob/var/variable

Workaround:
Access the variable first beforehand. Accessing the vars list won't make this message appear, so if it doesn't exist, it won't trigger. This will issue a warning if used alone, though. Only assignment (the direct assignment operator '=') seems to trigger this message.
Lummox JR resolved issue with message:
Assignments to undefined vars always printed the error to world.log instead of sending the error message as in a normal exception.