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
Right now, if an OSError happens for not finding a file or directory, it's almost impossible to figure out what caused that error, because it does not print the file or directory it's trying to access.
Description
Here's an example error:
Hint: used config file '/home/kmodi/usr_local/apps/6/nim/devel/config/nim.cfg' [Conf]
Hint: used config file '/home/kmodi/usr_local/apps/6/nim/devel/config/config.nims' [Conf]
Hint: used config file '/home/kmodi/usr_local/apps/6/nim/devel/config/nimdoc.cfg' [Conf]
Hint: system [Processing]
Hint: widestrs [Processing]
Hint: io [Processing]
Hint: foo [Processing]
oserr.nim(94) raiseOSError
Error: unhandled exception: No such file or directory [OSError]
Print the file/dir attempted to be accessed as well?
Print a back trace of where this OSError got issued from. Example. If a copyFile call in nimdoc.nim caused this, the error should show that information.
Thanks.
The text was updated successfully, but these errors were encountered:
the fix is to extend what was done here #8393 to other procs; ideally simply show the minimal runtime information that's sufficient to debug what went wrong; eg: raiseOSError(osLastError())
=> raiseOSError(osLastError(), dir)
Print a back trace of where this OSError got issued from. Example. If a copyFile call in nimdoc.nim caused this, the error should show that information.
here is another error message which can be improved. when copyFile proc got directory as argument this error message appear.
Improved error message should include "is not a file" sentence.
Summary
Right now, if an OSError happens for not finding a file or directory, it's almost impossible to figure out what caused that error, because it does not print the file or directory it's trying to access.
Description
Here's an example error:
Ref: #13191
Is it possible for that error to do these:
copyFile
call innimdoc.nim
caused this, the error should show that information.Thanks.
The text was updated successfully, but these errors were encountered: