001/* 002 * The MIT License 003 * Copyright (c) 2012 Microsoft Corporation 004 * 005 * Permission is hereby granted, free of charge, to any person obtaining a copy 006 * of this software and associated documentation files (the "Software"), to deal 007 * in the Software without restriction, including without limitation the rights 008 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 009 * copies of the Software, and to permit persons to whom the Software is 010 * furnished to do so, subject to the following conditions: 011 * 012 * The above copyright notice and this permission notice shall be included in 013 * all copies or substantial portions of the Software. 014 * 015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 016 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 017 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 018 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 019 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 020 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 021 * THE SOFTWARE. 022 */ 023 024package microsoft.exchange.webservices.data.core.exception.misc; 025 026public class ArgumentNullException extends ArgumentException { 027 028 /** 029 * Constructs an <code>IllegalArgumentException</code> with the specified detail message. 030 * 031 * @param message the detail message. 032 */ 033 public ArgumentNullException(String message) { 034 super(message); 035 } 036 037 /** 038 * Constructs an <code>IllegalArgumentException</code> with the specified detail message. 039 * 040 * @param s the detail message. 041 * @param paramName the Name of the Param that causes the exception 042 */ 043 public ArgumentNullException(String s, String paramName) { 044 super(s, paramName); 045 } 046 047 /** 048 * Constructs a new exception with the specified detail message and cause. 049 * 050 * <p>Note that the detail message associated with <code>cause</code> is <i>not</i> automatically 051 * incorporated in this exception's detail message. 052 * 053 * @param message the detail message (which is saved for later retrieval by the {@link 054 * Throwable#getMessage()} method). 055 * @param cause the cause (which is saved for later retrieval by the {@link Throwable#getCause()} method). 056 * (A <code>null</code> value is permitted, and indicates that the cause is nonexistent or 057 * unknown.) 058 * @since 1.5 059 */ 060 public ArgumentNullException(String message, Throwable cause) { 061 super(message, cause); 062 } 063 064 /** 065 * Constructs a new exception with the specified cause and a detail message of <code>(cause==null ? null : 066 * cause.toString())</code> (which typically contains the class and detail message of <code>cause</code>). This 067 * constructor is useful for exceptions that are little more than wrappers for other throwables (for 068 * example, {@link java.security.PrivilegedActionException}). 069 * 070 * @param cause the cause (which is saved for later retrieval by the {@link Throwable#getCause()} method). 071 * (A <code>null</code> value is permitted, and indicates that the cause is nonexistent or 072 * unknown.) 073 * @since 1.5 074 */ 075 public ArgumentNullException(Throwable cause) { 076 super(cause); 077 } 078 079 /** 080 * Constructs a new exception with the specified cause and a detail message of <code>(cause==null ? null : 081 * cause.toString())</code> (which typically contains the class and detail message of <code>cause</code>). This 082 * constructor is useful for exceptions that are little more than wrappers for other throwables (for 083 * example, {@link java.security.PrivilegedActionException}). 084 * 085 * @param cause the cause (which is saved for later retrieval by the {@link Throwable#getCause()} 086 * method). (A <code>null</code> value is permitted, and indicates that the cause is 087 * nonexistent or unknown.) 088 * @param paramName the Name of the Param that causes the exception 089 */ 090 public ArgumentNullException(Throwable cause, String paramName) { 091 super(cause, paramName); 092 } 093 094 /** 095 * Initializes a new instance of the System. ArgumentException class with a specified error message and the 096 * name of the parameter that causes this exception. 097 * 098 * @param message The error message that explains the reason for the exception. 099 * @param cause the cause (which is saved for later retrieval by the {@link Throwable#getCause()} 100 * method). (A <code>null</code> value is permitted, and indicates that the cause is 101 * nonexistent or unknown.) 102 * @param paramName the Name of the Param that causes the exception 103 */ 104 public ArgumentNullException(String message, Throwable cause, String paramName) { 105 super(message, cause, paramName); 106 } 107}