- use custom error function