Re: FYI: New project. libctrans



Comparing to GError (http://library.gnome.org/devel/glib/stable/glib-Error-Reporting.html)

- GError limits to inform the calling function of an error in the called function.
- libctrans jump back to the start of the transaction, for example the main loop where a (submit form) "button press" was called. Any functions in the midst must not to worry about checking GError.


- GError differentiates between *runtime errors* and *programming errors*.
- libctrans differentiates between *context aware* final applications (context are is the sum of users, servers, network connections, ...) and *context unaware* libraries:
 *context aware* applications differentiates between "user errors" (empty/wrong password), "administrator errors" (network failure, database down, disk full, ...) and "implementation errors" (usefull for unit-testing). If a user tries to log in and he/she makes a mistake a warning will inform of such error, but if he could not authenticate due to a network failure, he will be informed of a network error and not with the typical "There was an error, try again" or even a FALSE warning "wrong user/password". The function in charge of processing errors can for example send an email to the system administrator when an "administrator error" is found. The code in charge of checking the password has not to worry about database errors. The code in charge of the database has not to worry about network errors, and so on.

- libctrans try to associate resources to transactions (memory allocations, file handlers, ...). When the transaction finishs such resources are freed.


Hope this explain a little bit the problems libctrans try to address.

Regards

Enrique

On Sun, Apr 4, 2010 at 9:07 PM, Behdad Esfahbod <behdad behdad org> wrote:
On 04/04/2010 11:22 AM, ENRIQUE ARIZON BENITO wrote:

> I think people in charge of glib development could be interested in
> integrating it with glib since I have found no equivalent.

Maybe you can explain in a paragraph what problem you are trying to address?

behdad


> Regards,
>
> Enrique



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