remove duplicate code

If all examples raise the same SystemExit error, this way might be simpler and better.
Thanks :)