function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Query on Exception class.

I am creating w web service which ll be accessed by external Java app.
Global class Testline {

/* Nested class to structure the result set to sent by the Web Service */
global class TestData{
    webservice list<Obj_Tview__c> plv= new list<Obj_Tview__c>();
    webservice integer count;
    webservice string role;
public class myexception extends exception{}
/* Nested class to store data from different SObject Lists */
WebService static TestData Tmethod(date Frmdt, date todt) {

if(FrmDt==null || todt==null) {
throw new myexception('This is bad');
getpipelinedate sp= new getpipeline data();
return sp;
This web service if tested by unit test, it throws the exception.
I wonder how will it behave when the external java app calls the web service. Actually I was seeing the WSDl generated there is no place holder for eception. How java app will catch the exception.