Remove direct using of Exception class