This can simply be:

```ruby
UnexpectedError === self.failure
```