Mercurial > SimpleWebPresenter
diff common-functions.inc @ 61:13d899b748b7
Throw exception rather than exiting plain.
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Thu, 11 Oct 2012 17:19:13 +0200 |
| parents | ba5afd9ff24e |
| children | 74f7b64bdb78 |
line wrap: on
line diff
--- a/common-functions.inc Thu Oct 11 17:05:25 2012 +0200 +++ b/common-functions.inc Thu Oct 11 17:19:13 2012 +0200 @@ -103,7 +103,7 @@ function getElementByTagName($obj, $name) { $elems = $obj->getElementsByTagName($name); if ($elems->length != 1) { - exit; + throw new Exception("More than one tag with name \"${name}\""); } $elem = $elems->item(0); return $elem;
