Add core exception class