Mercurial > SimpleWebPresenter
changeset 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 | 63ea1cfd387d |
| children | b7efe2ecbc11 |
| files | common-functions.inc |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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;
