Re: [Vala] Weird error handling

On Wed, Jul 13, 2011 at 12:13:41PM +0200, Tomasz Jankowski wrote:

While working on project I discovered invalid (in my opinion) error
handling. I wrote simple program (code below), which demonstrate, that
"catch" clause in some_function() catch errors threw from this function. On
the output program gives

a 'B' error and an 'A' error

but it should display

an 'A' error

GLib.Error catches all kind errors, so you throw new SomeError.B ("a \'B\' error
and " + error.message);

-- - The Universal Operating System

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