Changed exception class to return an exception rather than throwing it. Also changed anywhere that the exception class is called to then throw that exception.
Merge branch 'hotfix/exception'