/* This file is part of SableCC (http://sablecc.org/).
 * 
 * See the NOTICE file distributed with this work for copyright information.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.sablecc.sablecc.exception;

public class InternalException
        extends RuntimeException {

    private static final long serialVersionUID = -4845566874186665747L;

    public InternalException(
            String message) {

        super(message);

        if (message == null) {
            throw new InternalException("message may not be null");
        }
    }

    public InternalException(
            String message,
            Throwable cause) {

        super(message, cause);

        if (message == null) {
            throw new InternalException("message may not be null");
        }

        if (cause == null) {
            throw new InternalException("cause may not be null");
        }
    }

}

@@ -732,16 +732,326 @@
 ption;%0A%0A
+/**%0A * This class represents an internal exception.%0A * %0A * An internal exception is thrown when an error occurs during the normal%0A * operation of the Virtual Machine. Since it is a subclass of RuntimeException,%0A * it is not required to declare it in the heading of a method in which it might%0A * be thrown.%0A */%0A
 public c
@@ -1105,24 +1105,79 @@
 xception %7B%0A%0A
+    /** Serial version identifier for serialization */%0A
     private 
@@ -1245,205 +1245,1098 @@
     
-public InternalException(%0A            String message) %7B%0A%0A        super(message);%0A%0A        if (message == null) %7B%0A            throw new InternalException(%22message may not be null%22);%0A        %7D%0A    %7D%0A
+/**%0A     * Constructs a new internal exception with the provided error message.%0A     * Verification is made for the provided message not to be %3Ccode%3Enull%3C/code%3E.%0A     * %0A     * @param message%0A     *            a %3Ccode%3EString%3C/code%3E being the error message.%0A     * @throws InternalException%0A     *             if the message is %3Ccode%3Enull%3C/code%3E.%0A     */%0A    public InternalException(%0A            String message) %7B%0A%0A        super(message);%0A%0A        if (message == null) %7B%0A            throw new InternalException(%22message may not be null%22);%0A        %7D%0A    %7D%0A%0A    /**%0A     * Constructs a new internal exception with the provided error message and%0A     * the cause of the error. Verifications are made for the provided message%0A     * and cause not to be %3Ccode%3Enull%3C/code%3E.%0A     * %0A     * @param message%0A     *            a %3Ccode%3EString%3C/code%3E being the error message.%0A     * @param cause%0A     *            a %3Ccode%3EThrowable%3C/code%3E object being the cause of the%0A     *            error.%0A     * @throws InternalException%0A     *             if the message or the cause is %3Ccode%3Enull%3C/code%3E.%0A     */
 %0A   

Add javadoc comments. See ticket:6.