Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Same thing as last night, Pinky, try and take over the world!

by keszler (Priest)
on Oct 01, 2011 at 02:06 UTC ( #928980=note: print w/replies, xml ) Need Help??


in reply to Re: Same thing as last night, Pinky, try and take over the world!
in thread Philosophy: Got the Data, Now what?

Since you can edit the messages in the C source, I suggest adding a unique but easily distinguished error ID code to each one. For example:

"Something bad happened. (err0r_aaaa)" "Oh crap - you're hosed. (err0r_aaab)" "The thingamajig dumped. (err0r_aaac)"
Then a simple $ grep -rin err0r * in the top-level source directory will result in something like:
some/dir/something.c:42: dump_err("The thingamajig dumped. (err +0r_aaac)"); some/thisthing.c:32: log("Something bad happened. (err0r_aaaa)"); thatthing.c:41: return "Oh crap - you're hosed. (err0r_aaab)";
which you can split into path/filename, line#, and error message to update whatever you use to track the error messages.

Bonus, whenever someone receives an error message you can use the (idcode) to determine the exact source of the message, even if different .c files have otherwise identical messages.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://928980]
help
Chatterbox?
[choroba]: do you mean & without \?
[stonecolddevin]: or bitwise stuff?

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2016-12-07 18:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (131 votes). Check out past polls.