Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------
- DBWrapper class
- ------------------
- 1. readData appel readDataEXE() et attrape DBWrapperStatementException
- readData() {
- try {
- ...
- readDataEXE() et attrape ();
- ...
- } catch (DBWrapperStatementException $ex){
- // ICI, L'EXCEPTION N'EST PAS ATTRAPÉ !!!
- echo "readData(): Caught DBWrapperStatementException!"
- throw $ex;
- }
- }
- 2. readDataEXE constuit un objet DBWrapperStatement et attrape DBWrapperStatementException
- readDataEXE() {
- try {
- ...
- $stmt = new DBWrapperStatement();
- ...
- } catch (DBWrapperStatementException $ex){
- echo "readDataEXE(): Caught DBWrapperStatementException!"
- throw $ex;
- }
- }
- 3. Le constructeur du DBWrapperStatement lance une exception DBWrapperStatementException
- ------------------
- DBWrapperStatement class
- ------------------
- Constructor {
- throw new throw new DBWrapperStatementException("TEST!!!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement