NAME
POE::Filter::SimpleHTTP::Error - An error object for SimpleHTTP
VERSION
version 0.091710
SYNOPSIS
use 5.010; use POE::Filter::SimpleHTTP; use POE::Filter::SimpleHTTP::Error; #exports constants by default
my $filter = POE::Filter::SimpleHTTP->new(); $filter->get_one_start([qw/junk data goes here/]); my $ret = $filter->get_one()->[0];
if($ret->isa('POE::Filter::SimpleHTTP::Error')) { say $ret->error(); # 0 (aka. UNPARSABLE_PREAMBLE); say $ret->context(); # junkdatagoeshere }
DESCRIPTION
This module provides the error class and exported constants for use downstream from the filter to determine what went wrong.
PUBLIC ACCESSORS
- error()
 - 
error() contains the actual error code from the filter that corresponds with the exported constants. Suitable for use in numeric comparisons (ie. ==)
 - context()
 - 
If the error has any context associated with it, it will be stored here. Note that some decompression routines do not provide a status message, just return undef, and so there is no context returned.
 
EXPORTED CONSTANTS
- UNPARSABLE_PREAMBLE
 - 
The data provided doesn't parse for some reason as either a Response or Request. Context provided.
 - TRAILING_DATA
 - 
The message contains trailing data that isn't allowed by the RFC. Context provided.
 - CHUNKED_ISNT_LAST
 - 
chunked isn't last in the transfer encodings. This isn't allowed by the RFC. Context provided.
 - INFLATE_FAILED_INIT
 - 
Compress::Zlib::inflateInit failed. Context provided.
 - INFLATE_FAILED_INFLATE
 - 
inflate() failed. Context provided.
 - UNCOMPRESS_FAILED
 - 
uncompress() failed. No context.
 - GUNZIP_FAILED
 - 
memGunzip() failed. No context.
 - UNKNOWN_TRANSFER_ENCODING
 - 
A transfer encoding was not recognized. Context provided.
 
AUTHOR
Copyright 2009 Nicholas Perez. Licensed and distributed under the GPL.