From 8443413d4c72fa89bbf16382ad45a455ac19113c Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 29 Apr 2012 08:06:46 +0200 Subject: [PATCH] Testing uncaught exception catching --- frontend/test.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/frontend/test.php b/frontend/test.php index 3915c8a..5426e90 100644 --- a/frontend/test.php +++ b/frontend/test.php @@ -13,11 +13,18 @@ $settings['master_privkey'] = "/etc/cvm/key"; $settings['master_pubkey'] = "/etc/cvm/key.pub"; $sNode = new Node(1); -var_dump($sNode->sRealHostname); -var_dump($sNode->sRealHostname); -var_dump($sNode->sRealHostname); -var_dump($sNode->sRealHostname); -var_dump($sNode->sRealHostname); -var_dump($sNode->sRealHostname); +try +{ + var_dump($sNode->sRealHostname); + var_dump($sNode->sRealHostname); + var_dump($sNode->sRealHostname); + var_dump($sNode->sRealHostname); + var_dump($sNode->sRealHostname); + var_dump($sNode->sRealHostname); +} +catch (Exception $e) +{ + echo("An exception occurred."); +} ?>