You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error objects have no file and line in their message #5
Give Error objects the file and line where they were raised, as string errors have in front of their message.
Why
error( "msg" ) produces file.lua:12: msg, but an Error object's message has no place: it's only in its traceback. A printed or logged error object doesn't say where it came from.
Details
Listed in docs/api.md, Known Issues (0.4.0).
The place could be taken with debug.getinfo when the object is created (the traceback already starts there) and stored as a field, or put in front of tostring( err ). Changing the message itself would affect code that compares messages.
Activity