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 * @version $version$ (2013-01-30) 014 */ 015 public class ParseException extends GeneralException { 016 017 018 /** 019 * Creates a new parse exception. 020 * 021 * @param message The exception message. May be {@code null}. 022 */ 023 public ParseException(final String message) { 024 025 this(message, null, null); 026 } 027 028 029 /** 030 * Creates a new parse exception. 031 * 032 * @param message The exception message. May be {@code null}. 033 * @param cause The exception cause, {@code null} if not specified. 034 */ 035 public ParseException(final String message, final Throwable cause) { 036 037 this(message, null, cause); 038 } 039 040 041 /** 042 * Creates a new parse exception. 043 * 044 * @param message The exception message. May be {@code null}. 045 * @param error The associated error, {@code null} if not specified. 046 */ 047 public ParseException(final String message, final ErrorObject error) { 048 049 this(message, error, null); 050 } 051 052 053 /** 054 * Creates a new parse exception. 055 * 056 * @param message The exception message. May be {@code null}. 057 * @param error The associated error, {@code null} if not specified. 058 * @param cause The exception cause, {@code null} if not specified. 059 */ 060 public ParseException(final String message, 061 final ErrorObject error, 062 final Throwable cause) { 063 064 super(message, error, cause); 065 } 066 067 068 /** 069 * Creates a new parse exception. 070 * 071 * @param message The exception message. May be {@code null}. 072 * @param error The associated error, {@code null} if not 073 * specified. 074 * @param redirectURI The associated redirection URI, must not be 075 * {@code null}. 076 * @param state The optional associated state parameter, 077 * {@code null} if not specified. 078 * @param cause The exception cause, {@code null} if not 079 * specified. 080 */ 081 public ParseException(final String message, 082 final ErrorObject error, 083 final URL redirectURI, 084 final State state, 085 final Throwable cause) { 086 087 super(message, error, redirectURI, state, cause); 088 } 089 }