Assert on error instance with custom message.