#44 exception handling

Next_Version
closed-fixed
5
2006-02-25
2006-02-24
No

release version 1.14

hello

no error handling is performed when passing an array to
function execute (but it seems to work with a 'static'
query) so transaction is not invalidated when sql error
occurs. Simply comment the code that return false at
line 430 mysqlt_driver.inc seems to work better :)

cheers.
Grisha

Discussion

  • Mark Dickenson

    Mark Dickenson - 2006-02-25

    Logged In: YES
    user_id=752816

    You are right. Thanks for catching it.

    Do not comment out the line you indicated. If you do and
    you have an array of 3 queries being executed and the last
    query in the array works but the first or second one fails
    you will still not see an exception.

    Find line (the one you said to comment out)...

    if ($resultId === false) return $false;

    and replace it with...

    if ($resultId === false) { // error handling if query fails
    if ($fn = $this->raiseErrorFn)
    $fn($this->dbtype, 'EXECUTE', $this->ErrorNo(),
    $this->ErrorMsg(), $this->sql, $inputarr, $this);
    return $false;
    }

    This will cause the exception to thrown as soon as the
    error occures.

     
  • Mark Dickenson

    Mark Dickenson - 2006-02-25
    • milestone: --> Next_Version
    • status: open --> open-fixed
     
  • Mark Dickenson

    Mark Dickenson - 2006-02-25
    • status: open-fixed --> closed-fixed
     
  • Mark Dickenson

    Mark Dickenson - 2006-02-25

    Logged In: YES
    user_id=752816

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks