MySQL Lists are EOL. Please join:

List:NDB Connectors« Previous MessageNext Message »
From:Mika Raento Date:March 22 2007 8:52am
Subject:exceptions and perl
View as plain text  
Using or not using exceptions in perl is (of course) a matter of taste. 
eval { } is the same as try { }. With DBI you choose whether you want 
return values or exceptions with the RaiseError option.

My opinion?

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.

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).

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