Happy Business Starts Here

0 Kudos

Expose global exceptions for global methods

It is a best practice in software development to not catch all generic exceptions as in

 

try{
    // apex code that calls zqu global methods
}
catch (Exception e) {
     // handle and/or rethrow, etc.
}

However I find with many of the methods I call non-global exceptions are thrown which I am unable to catch such as

 

try{
    // apex code that calls zqu global methods
}
catch (zqu.zApi.zApiException e) { // Will not compile
     // handle and/or rethrow, etc.
}

It would be best if the Zuora for Salesforce code handled it's internal exceptions and exposed a global exception that developers can catch when necessary.