Why PHP is not showing exception?

Ardiano1

New Member
I am using following code. When the query crashes, it is not displaying the ALERT that I defined in the "catch" block.\[code\]<?php error_reporting(E_ALL ^ E_NOTICE); require_once("../Lib/dbaccess.php"); //Retrieve values from Input Form $CategoryName = $_POST["inCategory"]; $TotalMembers = $_POST["inTotalMembers"]; $Details = $_POST["inDetails"]; $CategoryName = $_POST["inCategory"]; $Chairman = $_POST["inChairman"]; $InsertQuery = "REPLACE INTO electioncategorymaster (ecname, ecdescription, ectotalmembers, ecchairman, lastupdated) VALUES ('".$CategoryName."','".$Details."',".$TotalMembers.",'".$Chairman."',now())"; try { $Result = dbaccess::InsertRecord($InsertQuery); } catch(exception $ex) { echo "<script type='text/javascript'>alert('".$ex."');</script>"; }?>\[/code\]
 
Back
Top