Created
July 26, 2018 22:33
-
-
Save SalesforceBobLightning/ad6b6d7f12a6542f38b647756bad6368 to your computer and use it in GitHub Desktop.
Custom Salesforce Apex Exception Class Without Constructor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class CustomExceptionWithoutConstructor extends Exception { | |
public override String getMessage() { | |
List<String> args = new String[]{super.getMessage()}; | |
return String.format('Your custom message here with one argument: {0}', args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment