001package com.nimbusds.oauth2.sdk; 002 003 004import java.net.URL; 005 006import com.nimbusds.oauth2.sdk.id.ClientID; 007import com.nimbusds.oauth2.sdk.id.State; 008 009 010/** 011 * Parse exception. 012 * 013 * @author Vladimir Dzhuvinov 014 */ 015public 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, null, 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, null, null, 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, null, null, 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 this(message, error, null, null, null, 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 clientID The associated client identifier. Must not be 075 * {@code null}. 076 * @param redirectURI The associated redirection URI. Must not be 077 * {@code null}. 078 * @param state The optional associated state parameter, 079 * {@code null} if not specified. 080 */ 081 public ParseException(final String message, 082 final ErrorObject error, 083 final ClientID clientID, 084 final URL redirectURI, 085 final State state) { 086 087 this(message, error, clientID, redirectURI, state, null); 088 } 089 090 091 /** 092 * Creates a new parse exception. 093 * 094 * @param message The exception message. May be {@code null}. 095 * @param error The associated error, {@code null} if not 096 * specified. 097 * @param clientID The associated client identifier. Must not be 098 * {@code null}. 099 * @param redirectURI The associated redirection URI. Must not be 100 * {@code null}. 101 * @param state The optional associated state parameter, 102 * {@code null} if not specified. 103 * @param cause The exception cause, {@code null} if not 104 * specified. 105 */ 106 public ParseException(final String message, 107 final ErrorObject error, 108 final ClientID clientID, 109 final URL redirectURI, 110 final State state, 111 final Throwable cause) { 112 113 super(message, error, clientID, redirectURI, state, cause); 114 } 115}