Re:Long Error Messages
by jareklupinski on Wednesday September 22, 2021 @12:36PM
(#28618450)
how do you keep from colliding with an existing code when writing a new one, just search the repo for its use before committing or...?
[ Parent
| on HN ]
All codes are kept with a constant name prefixed with E_ in one file.
That must be a joy to edit. "Oh, a new error. Time to recompile the whole system!"
It's not an uncommon pattern: https://github.com/postgres/postgres/blob/master/src/backend...
I wasn't making any statement about how common it was, only about how impractical it was.
And soon enough you'll find that it is just more convenient to reuse a few error codes here and there, and soon enough applications just report "error -1: resource failure" or "internal failure" or some other meaningless thing. Far better to just return a string.
Re:Long Error Messages
by jareklupinski on Friday September 24, 2021 @01:03PM
(#28645078)
> Section: Class 57 - Operator Intervention
> # (class borrowed from DB2)
> Section: Class 72 - Snapshot Failure > # (class borrowed from Oracle)
Nothing from SAP / ABAP ? :^)