I wrote next code:

        void foo(string _error = null)
        {
            writeln("Error");
        }
    override:
        @errorDisplay!foo
Json doTrackSpeedAnalyze(int trackid, string startDateTime, string endDateTime) // /api/mytrack?trackid=123&startDateTime=2000&endDateTime=2010
        {
            if(endDateTime.length == 0)
            {
                throw new Exception("End Date must not be empty");
            }
            return Json.emptyObject;
        }

If I access to url: /api/mytrack?trackid=123&startDateTime=2000 (witout endDateTime) I am expecting execution foo() block, but it does not happens. Why?

And what do Exception here? Why should handle it?

Reply via email to