Upgrading 46 Java Service

hi I have to do a upgration of a code from wm4.6 to wm6.1.
In wm4.6 there is a custom code. It basically catches the error in Try block and then exposes it and then sends it to catch block

private void ExposeErrorStatusMethod(
String ErrorMessage)
throws AdapterException, BrokerException
throw new AdapterException(“ErrorMessage:” + ErrorMessage + “:”);

how do we write the same java services in wm6.1. what will be the input and output of the java service.
kindly help me out.
thanks and regards

you can throw service exceptions, try searching in forums for more help.