Move common exception to namespace which is cores.

Move common exception to namespace which is cores and fix a bug in ExceptionHandler.php.
Please review it.