Author image Richard Harris
and 1 contributors


DataLoader::Error - simple error message object for use with DataLoader


 my $error = DataLoader::Error->new("timed out");

 # Recommended
 DataLoader->error("timed out")


This is an internal error object and should be created via DataLoader->error. Its only purpose is to mark error results within the cache and the return values of the batch loading function, to distinguish them from successful results.

If a caller requests a data load and an object of this class is returned, it will trigger an exception for the caller.


new ( message )

Accepts message (a string) and creates the error object.

message ()

Returns the message for this error object.

throw ()

Equivalent to die $self->message.