added CustomException to render error message. Error message in javascript alert box (just for fun)