Product: PHPed
Version: 3.3.3 (Build 3397)
I have written a script that uses a switch statement with 20+ options.
When I try to run this in PHPed, I get a Windows Script Error. I have removed different sections of the code in order to determine what was causing the problem. Here is what I have found.
If you do not have "case" in front of the case statement, PHPed crashes as explained above, with no error information to point you in the right direction.
Is it possible to trap this crash and display pertinent error information in the future?
--Code Snippet Crashes--
case "ManPartNo" :
"Manufacturer_Part_Number": $relay=trim($data["ISBN"]); break;
default : $relay = $defaults[$fieldname];
} // end switch |
--End Code Snippet--
The correct code snippet
--Code Snippet Crashes--
case "ManPartNo" :
case "Manufacturer_Part_Number": $relay=trim($data["ISBN"]); break;
default : $relay = $defaults[$fieldname];
} // end switch |
--End Code Snippet--