move exceptions to its own class