General

What is this project all about?
With smart-exceptions the developers code and comment exception codes. Generators will produce reports from the information and include it in the Maven site documentation.

[top]


The report seems to be target at developers. Are other audiences, such as operations or users of the system also supported.
You should generate an XML report and process these documents further. Please have a look at Generating reports for different Audiences for details.

[top]

Implementation

I want to change the syntax of the codes. What do I have to do?
Your exceptions reference an instance of a NumberCode implementation. For instance
    /**
     * Default constructor.
     *
     * @param componentId
     *            the component identifier.
     * @param majorNumber
     *            the major part of the error code.
     * @param minorNumber
     *            the minor part of the error code.
     */
    private SecurityServiceNumberCode(final String componentId,
            final Integer majorNumber, final Integer minorNumber)
    {
        this.info = new NumberCodeInfo(componentId, majorNumber, minorNumber);
    }

To change the syntax of the code implement the NumberCode and create an instance in every exception that uses this special format.

[top]


I want to change the content of the unique exception identifier. What do I have to do?
Provide an implementation of the IdFactory interface. Then add a context as specified in I want adapt the exception configuration. What do I have to do?.

You may want to consider the implementation of UuidFactory as an example.

[top]


I want to change the bundle provider to fetch message texts from a different location (e.g. a database). What do I have to do?
Provide an implementation of the BundleProvider interface. Then add a context as specified in I want adapt the exception configuration. What do I have to do?.

You may want to consider the implementation of ClassPathBundleProvider as an example.

[top]


I want to change the message composer to implement a different strategy how messages are rendered. What do I have to do?
Provide an implementation of the MessageComposer interface. Then add a context as specified in I want adapt the exception configuration. What do I have to do?.

You may want to consider the implementation of DefaultMessageComposer as an example.

[top]


I want adapt the exception configuration. What do I have to do?
Provide an implementation of the I18nExceptionContext (localized messages required) or ExceptionContext (no localized messages required). Consider to subclass either DefaultI18nExceptionContext (localized messages required) or DefaultExceptionContext.

Add a file specifying your implementation, e.g

de.mycompany.exceptions.i18n.id.context.MySpecialI18nExceptionContext

to the following location

META-INF/services/de.smartics.exceptions.core.ExceptionContext

in your project.

For more information please refer to

[top]


My Javadoc comments cannot be parsed! What is wrong with my HTML comments?
Currently the comments are required to be valid XML. This includes that no HTML entities may be used.

[top]