test on int instead of exception