Beefy Boxes and Bandwidth Generously Provided by pair Networks Russ
Clear questions and runnable code
get the best and fastest answer
 
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.


Comment on Re^2: Same thing as last night, Pinky, try and take over the world!
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://928980]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-04-16 10:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (423 votes), past polls