001    package com.nimbusds.oauth2.sdk;
002    
003    
004    import java.net.URL;
005    
006    import com.nimbusds.oauth2.sdk.id.State;
007    
008    
009    /**
010     * Parse exception.
011     *
012     * @author Vladimir Dzhuvinov
013     */
014    public class ParseException extends GeneralException {
015    
016    
017            /**
018             * Creates a new parse exception.
019             *
020             * @param message The exception message. May be {@code null}.
021             */
022            public ParseException(final String message) {
023            
024                    this(message, null, null);
025            }
026            
027            
028            /**
029             * Creates a new parse exception.
030             *
031             * @param message The exception message. May be {@code null}.
032             * @param cause   The exception cause, {@code null} if not specified.
033             */
034            public ParseException(final String message, final Throwable cause) {
035            
036                    this(message, null, cause);
037            }
038    
039    
040            /**
041             * Creates a new parse exception.
042             *
043             * @param message The exception message. May be {@code null}.
044             * @param error   The associated error, {@code null} if not specified.
045             */
046            public ParseException(final String message, final ErrorObject error) {
047            
048                    this(message, error, null);
049            }
050    
051    
052            /**
053             * Creates a new parse exception.
054             *
055             * @param message The exception message. May be {@code null}.
056             * @param error   The associated error, {@code null} if not specified.
057             * @param cause   The exception cause, {@code null} if not specified.
058             */
059            public ParseException(final String message, 
060                                  final ErrorObject error,
061                                  final Throwable cause) {
062            
063                    super(message, error, cause);
064            }
065    
066    
067            /**
068             * Creates a new parse exception.
069             *
070             * @param message     The exception message. May be {@code null}.
071             * @param error       The associated error, {@code null} if not
072             *                    specified.
073             * @param redirectURI The associated redirection URI, must not be 
074             *                    {@code null}.
075             * @param state       The optional associated state parameter, 
076             *                    {@code null} if not specified.
077             * @param cause       The exception cause, {@code null} if not
078             *                    specified.
079             */
080            public ParseException(final String message, 
081                                  final ErrorObject error,
082                                  final URL redirectURI,
083                                  final State state,
084                                  final Throwable cause) {
085    
086                    super(message, error, redirectURI, state, cause);
087            }
088    }