Feature custom err obj

@nhaarman @TheN1ckname 

Added support for custom error objects