[Evolution-hackers] Re: error messages




I had another idea whilst falling asleep last night (damn novell get value for money out of us guys with no lives!), an XML error definition, and then you invoke it with a call with parameters.

e.g. something like
<error id="FOLDER_CREATE">
<primary>Error creating folder `${0}'</primary>
<secondary>The folder `${0}' already exists, you should choose another name.</secondary>
</error>

Then an error to header compiler that converts this to a #define id which is what you use in the code (it could also do i18n substitions/expansions and whatnot).
e-error-gen --label EM_ERROR em-errors.xml

And then a call to invoke it:
e_error(EM_ERROR_FOLDER_CREATE, name, camel_exception_get_description(ex));
etc.

Obviously something a little more filled out, and some sort of type/arg checking if possible, this is just an overview.

Actually it would be kind of nice if we used a global error definition system which mapped to this stuff/something similar better.  i.e. GError done better.  Like subclassable exceptions.  Too many possibilities as usual though (and probably none of them doable just yet).


On Tue, 2004-04-13 at 19:07 -0400, JP Rosevear wrote:
On Wed, 2004-04-14 at 00:19 +0800, Not Zed wrote:
> 
> FYI, I told ben i might also look at some of the error message stuff
> he did, if i get the time (i.e. a standard error dialogue, its gonna
> have to be more than 1 call, or use markup)

I think more than 1 call is the way to go.

-JP
-- 
JP Rosevear <jpr ximian com>
Novell, Inc.

Michael Zucchi <notzed ximian com>

Ximian Evolution Software Developer


Novell, Inc.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]