create exception using modern python syntax