diff StatusCodes.inc @ 83:ff5fc61aa5ea

Throw only specific exceptions, eg. non of type Exception base.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Mon, 15 Oct 2012 16:52:28 +0200
parents 5e76b6feb2ad
children
line wrap: on
line diff
--- a/StatusCodes.inc	Mon Oct 15 16:51:07 2012 +0200
+++ b/StatusCodes.inc	Mon Oct 15 16:52:28 2012 +0200
@@ -303,7 +303,7 @@
     $matches = array();
     preg_match('/HTTP\/\S+\s(\d+)/', $header, $matches);
     if (count($matches) < 1)
-      throw new Exception("Not an http header");
+      throw new InvalidArgumentException("Not an http header");
     $n = $matches[1];
     return $n;
   }