move exception class to common.