Hi,
I have a class and the class has two methods, setdata and getdata.
The setdata method receives 2 input strings and updates a Z table.
Getdata outputs the data from the same Z table.
Now i want to handle run time errors.
so created the exception class and its super class is cx_static_check.
i have defined a method in exception class, it will print "parameters are blank", if the passing parameter to setdata does not contain any value.
in the method setdata i have used inside a if endif..try..catch endtry. statement.
Try checks whether the values are blank, if blank it raise exception and that needs to be caught by the catch statement into an object reference. using the object refernce i call method and print statement "parameters are blank".
now i get error "no open try statement".but in the setdata method i have both try...endtry.
also i have a doubt regarding choosing the check box "class based exception" for a method.
Does the methos that handles exception should be checked "class based exception" or which method to be checked as "class based exception"?