define custommized exception: GradientError