Re: [opendbx] Newbie questions about error handling

2009-10-01 Thread Norbert Sendetzky
Hi Marino Suppose I want to map from OpenDBX errors to SqueakDBX exceptions, I have to do it with the index of the array then. So, if you then change, reorder or whatever you do with the array, I will map wrong exceptions :( That won't happen until 2.0 as I would break binary compatibility

Re: [opendbx] Newbie questions about error handling

2009-10-01 Thread Norbert Sendetzky
Hi Mariano Why you think that is a bad idea? Don't you need (sometimes) to distinguish between one error and others? for example, don't you need to do or not to do something depending on the error you received ? Ok, you can have the error number as an instance variable and then use a switch

Re: [opendbx] Newbie questions about error handling

2009-10-01 Thread Mariano Martinez Peck
On Thu, Oct 1, 2009 at 2:31 PM, Norbert Sendetzky norb...@linuxnetworks.dewrote: Hi Mariano Why you think that is a bad idea? Don't you need (sometimes) to distinguish between one error and others? for example, don't you need to do or not to do something depending on the error you

Re: [opendbx] Newbie questions about error handling

2009-09-30 Thread Norbert Sendetzky
On Tue September 29 2009 23:57:06 Mariano Martinez Peck wrote: The question is: when I have an error with OpenDBX I can then call odbx_error() to obtain the description. The thing is, is that error number unique? I mean, if I have an error number -3 with the description XXX every time I get a

Re: [opendbx] Newbie questions about error handling

2009-09-30 Thread Norbert Sendetzky
On Wed September 30 2009 04:23:03 Mariano Martinez Peck wrote: Sorry, but I think the best thing is that I tell you my current problem: I don't remember C++ (I just programmed only once a couple of years ago) but in several object oriented languages, there is the concept of error handling

Re: [opendbx] Newbie questions about error handling

2009-09-30 Thread Mariano Martinez Peck
On Wed, Sep 30, 2009 at 4:13 AM, Norbert Sendetzky norb...@linuxnetworks.de wrote: On Tue September 29 2009 23:57:06 Mariano Martinez Peck wrote: The question is: when I have an error with OpenDBX I can then call odbx_error() to obtain the description. The thing is, is that error number

Re: [opendbx] Newbie questions about error handling

2009-09-29 Thread Mariano Martinez Peck
Sorry, but I think the best thing is that I tell you my current problem: I don't remember C++ (I just programmed only once a couple of years ago) but in several object oriented languages, there is the concept of error handling using exceptions. And of course, this is the case of Smalltalk. I