Related Links : Search Engine Optimization | | Search Engine Marketing | Online Marketing | Freelance Programmer| SEO Thailand | SEO Expert | SEO services | PHP Programmer Thailand | SEO Tutorial | What is SEO |

  Home Our SEO Services SEO Expert Consultant Php Programmer Scripts| Email : sachin {at} jainsachin {dot} com

PHP | Error handling | Manual | Tutorial | Help

SEO Services



Website Programming in PHP / MYSQL



Friends


    Error handling

    Error handling

    All SAMConnection methods that provide access to messaging operations return FALSE if an error occurred in processing the request. In addition the SAMConnection object has two properties, "errno" and "error", that provide respectively the error number and text description of the last error to occur on the connection.

    Example #1 Handling an error from a method that returns no result

    <?php
    if (!$conn->commit()) {
        
    // The commit failed!
        
    echo "Commit failed ($conn->errno) $conn->error";
    }
    ?>

    Example #2 Handling an error from a method that returns a result

    <?php
    $correlid 
    $conn->send('queue://send/test'$msg);

    if (!
    $correlid) {
      
    // The Send failed!
      
    echo "Send failed ($conn->errno) $conn->error";
    } else {
      ...
    }
    ?>


    SEO Tutorial / Articles





    Php / Mysql Tutorial



    Articles



      Portfolio


      SEO by Jainsachin