12 ini_set('http.only_exceptions', true);
15 HTTP_E_RUNTIME => 'Runtime',
16 HTTP_E_INVALID_PARAM => 'InvalidParam',
17 HTTP_E_HEADER => 'Header',
18 HTTP_E_MALFORMED_HEADERS => 'MalformedHeaders',
19 HTTP_E_REQUEST_METHOD => 'RequestMethod',
20 HTTP_E_MESSAGE_TYPE => 'MessageType',
21 HTTP_E_ENCODING => 'Encoding',
22 HTTP_E_REQUEST => 'Request',
23 HTTP_E_REQUEST_POOL => 'RequestPool',
24 HTTP_E_SOCKET => 'Socket',
25 HTTP_E_RESPONSE => 'Response',
29 foreach ($e as $i => $c) {
31 $n = "Http{$c}Exception";
33 } catch (HttpException $x) {
34 printf("%2d: %s\n", $i, get_class($x));
41 1: HttpRuntimeException
42 2: HttpInvalidParamException
43 3: HttpHeaderException
44 4: HttpMalformedHeadersException
45 5: HttpRequestMethodException
46 6: HttpMessageTypeException
47 7: HttpEncodingException
48 8: HttpRequestException
49 9: HttpRequestPoolException
50 10: HttpSocketException
51 11: HttpResponseException