Gets the last error associated with the stream.
const boost::system::error_code & error() const;
Return Value
An error_code
corresponding
to the last error from the stream.
Remarks
Returns a reference to an error_code
object representing the last failure reported by an istreambuf
function. The set of possible error_code
values and categories depends on the protocol of the URL used to open
the stream buffer.