Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2016-10-23 07:51 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (300 votes). Check out past polls.