added 'throwExceptionOnFailure'-option