Using @test_throws for any error/excpeption

You can specify the error type as Exception, which should catch all errors