Standard library methods which make syscalls in Go should return consistent errors and expose Errno

77 views
Skip to first unread message

Bhasker Hariharan

unread,
Apr 24, 2015, 5:07:59 PM4/24/15
to golan...@googlegroups.com
Hi,

I would like to propose a change to the way go's standard library methods which error in syscalls should always expose a SyscallError(wrapped maybe?) .
Further the SyscallError should be expanded to provide an Errno() method so that clients do not have to typecast the embedded Error() to extract the error code. 

This is especially important when trying to write socket level proxies/networking code that needs to have access to underlying system call error codes to either return similar error codes or be able to make more intelligent decisions on what to do with certain errors.

-Bhasker
Reply all
Reply to author
Forward
0 new messages