Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve correctly the parentType of several exception #92

Merged
merged 1 commit into from
Jun 12, 2023
Merged

Retrieve correctly the parentType of several exception #92

merged 1 commit into from
Jun 12, 2023

Conversation

badetitou
Copy link
Member

The following code has an error

package exceptions;

public class MultipleSubException {

    public static class MInnerException extends java.lang.Exception {
        
        public static class MRead extends MultipleSubException.MInnerException {

            public MRead(final MultipleSubException el, final String details, final Throwable cause) {
                super("Error : \n" + el.getName() + "\n> " + details, cause);
            }

        }

        public static class MWrite extends MultipleSubException.MInnerException {

            public MWrite(final MultipleSubException el, final String details, final Throwable cause) {
                super("Error : \n" + el.getName() + "\n> " + details, cause);
            }

        }

        public static class MReadWrite extends MultipleSubException.MInnerException {

            public MReadWrite(final MultipleSubException el, final String details, final Throwable cause) {
                super("Error : \n" + el.getName() + "\n> " + details, cause);
            }

        }
    
    }
}

In the above code MWrite and MReadWrite have as parentType the package and not the class MInnerException

@badetitou badetitou merged commit d7abf14 into moosetechnology:v3 Jun 12, 2023
@badetitou badetitou deleted the exception-parent-type branch June 12, 2023 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant