[haiku-development] Re: replacing runtime_loader

  • From: François Revol <revol@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 17 Mar 2016 01:44:19 +0100

On 17/03/2016 01:38, Tim Kelly wrote:

There's an "error" command in the shell for that :)

Oh - indeed, this could be handy:

~> error
usage: error <error number>
Prints clear text error messages for given error numbers.

Would the reverse be useful? - enter a string and get the error code
value: error [-n]  0x80000005  --> Invalid Argument; error -s 'Invalid
Argument' --> 0x8000005 or B_BAD_VALUE or some decomposition as
appropriate, and maybe any complimentary values


Usually you have only the error code that's printf-ed out for brevity, so.

It also accepts names like EINVAL or B_ERROR.


But patches are always appreciated; cf.
src/bin/error.c

I think something as simple as a -l to list all the known errors, so you
can | grep "Invalid" for ex. would be enough.

Note I'm not sure it's in sync with the complete error list nowadays.

François.

Other related posts: