[Live-devel] Error reporting guidelines

Ross Finlayson finlayson at live555.com
Wed Feb 14 14:28:48 PST 2007


>What are the coding guidelines for using the error and message reporting in
>LIVE?  I see different functions being used such as "env <<"
>"env.setResultMsg()" "perror()" "fprintf(stderr ... "

Best is to use "env <<", because that will work even if you later 
change your "UsageEnvironment" to use something other than console 
'stderr'.  ("fprintf(stderr, ...)" is still used in a few places in 
the code for casual debugging, but shouldn't really be; "env <<" is 
the preferred way to output error messages.

(In contrast, "env.setResultMsg()" is used to assign a (usually 
error) message that you may or may not necessarily want to print out 
later.)
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list