MySQL Lists are EOL. Please join:

List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:March 22 2007 6:04pm
Subject:Re: exceptions and perl
View as plain text  
On Thu, 2007-03-22 at 10:52 +0200, Mika Raento wrote:

> If we only use one mechanism, I'd strongly prefer exceptions over return 
> values. You can do RAII in perl, if you want, so it all fits together 
> quite nicely.

Ok, cool. It's been a long time since I've done large scale Perl
development, so I didn't feel adequate to make that call. Exceptions it
is. I'll go ahead and push the Perl-uses-exceptions patch then. Well,
after I've had some coffee, that is. 

> If we feel we have enough time I would very much like to see a way to 
> call functions that can be expected to fail with a parameter or a second 
> name which indicates that I'd like a return value instead of an 
> exception (a bit like open() in unix where you can say O_CREAT to create 
> the file if it doesn't exist or leave it out if you actually care 
> whether it existed or not).

I like this idea. Might have to do some crazy typemaps to do this
without manually adding an second function for every function - but I
think it's certainly worthwhile to try!

Monty Taylor, Senior Consultant
MySQL Inc., Seattle, USA,
Cell: +1 972 979 5079    VOIP: 6677
Office: +1 408 213 6677 

Are you MySQL certified?

SWIG_exception vs. SWIG_exception_failMika Raento21 Mar
  • Re: SWIG_exception vs. SWIG_exception_failMonty Taylor21 Mar
    • Re: SWIG_exception vs. SWIG_exception_failMonty Taylor22 Mar
      • exceptions and perlMika Raento22 Mar
        • Re: exceptions and perlMonty Taylor22 Mar