You need to sign in to do that
Don't have an account?
mikeafter6
Trying to create Exception Inheritance Tree; non-virtual and non-abstract type cannot be extended
I get the following error when trying to create a hierarchy of exception classes.
Save error: NoPersonLinkException: Non-virtual and non-abstract type cannot be extended: InvalidUserUserException
Samples in docs don't use virtual or abstract keywords when extending exception classes.
Please advise on syntax.
//FIRST CLASS:
public class InvalidUserException extends Exception{}
//SECOND CLASS:
public class NoPersonLinkException extends InvalidUserException{}
With Apex you can only extend an abstract class (or from what I have seen).
Since you are trying to extend the first class with the second class, you would need to have your first class created as abstract.
Doug
Does that mean that there is no way to reuse Accounts for our special case of Merchant? I would like to keep the built-in behaviour for Accounts with our Merchant object type without having to clutter the Accounts with unnecessary fields.
Morten