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