Use custom exception instead of generic one