Use standard java exception whenever possible and dropped the "errorCode" way of returning error.