Re: [Vala] Weird error handling
- From: Luca Bruno <lethalman88 gmail com>
- To: Tomasz Jankowski <tomcioj gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Weird error handling
- Date: Wed, 13 Jul 2011 12:19:57 +0200
On Wed, Jul 13, 2011 at 12:13:41PM +0200, Tomasz Jankowski wrote:
Hello!
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);
--
http://www.debian.org - The Universal Operating System
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]