[poppler] poppler/Error.cc

Albert Astals Cid tsdgeos at yahoo.es
Thu Mar 10 15:17:07 PST 2005


If you have a look at poppler/Error.cc you'll notice that it uses fprintf so 
if a user starts the poppler-using program from a shell he is going to see 
the errors in the shell. 

That is sometimes not desired as most errors reported by xpdf code are 
meaningless to a normal user, so in kpdf we have removed xpdf/Error.cc and 
provide a custom void CDECL error(int pos, char *msg, ...); that uses 
kdDebug() function instead, so the developer see the messages but the users 
do not, it can even be improved and catch some messages that may be 
meaningful to the user (like non-found fonts) and use a messagebox to show 
the user a warning.

The problem is how to make this, as i said in kpdf we have removed altogheter 
the Error.cc file, but if we do that in poppler that means the library is 
missing one symbol and every program that links to it has to provide a custom 
error() function that is not acceptable, so the best way would be give the 
aplication the option of providing a custom error function, the question 
is... how?

Albert



More information about the poppler mailing list