In linux (specifically I have Ubuntu 14) if some program terminates with an error, I can get numerical error code via $?
variable
$ ./failing_app
$ echo $?
However the number itself does not tell me much, how do I get error name and description?
There is a list of errors in $ man errno
but it gives only names, not numerical values.
I've search the google and results are quite strange: e.g. I have a toy Rust program in which I'm trying to access array element out of bounds. The program panics and $?
is 101
, however it is said to correspond to Network unreachable
error, which doesn't make any sense.