Oracle® Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47891-01

coherence/lang/NullPointerException.hpp

00001 /*
00002 * NullPointerException.hpp
00003 *
00004 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
00005 *
00006 * Oracle is a registered trademarks of Oracle Corporation and/or its
00007 * affiliates.
00008 *
00009 * This software is the confidential and proprietary information of Oracle
00010 * Corporation. You shall not disclose such confidential and proprietary
00011 * information and shall use it only in accordance with the terms of the
00012 * license agreement you entered into with Oracle.
00013 *
00014 * This notice may not be removed or altered.
00015 */
00016 #ifndef COH_NULL_POINTER_EXCEPTION_HPP
00017 #define COH_NULL_POINTER_EXCEPTION_HPP
00018 
00019 #include "coherence/lang/compatibility.hpp"
00020 
00021 #include "coherence/lang/RuntimeException.hpp"
00022 #include "coherence/lang/String.hpp"
00023 
00024 COH_OPEN_NAMESPACE2(coherence,lang)
00025 
00026 
00027 /**
00028 * Thrown when an application attempts to use <tt>NULL</tt> in a case where
00029 * a non-NULL handle to Object is required. These include:
00030 * <ul>
00031 * <li>Calling the instance method through a <tt>NULL</tt> handle.</li>
00032 * <li>Accessing or modifying the field through a <tt>NULL</tt> handle.</li>
00033 * <li>Dereferencing a <tt>NULL</tt> handle.</li>
00034 * </ul>
00035 * Applications should throw instances of this class to indicate other illegal
00036 * uses of <tt>NULL</tt> handles.
00037 */
00038 class COH_EXPORT NullPointerException
00039     : public throwable_spec<NullPointerException,
00040         extends<RuntimeException> >
00041     {
00042     friend class factory<NullPointerException>;
00043 
00044     // ----- constructors ---------------------------------------------------
00045 
00046     protected:
00047         /**
00048         * Create a NullPointerException.
00049         *
00050         * @param vsMsg   the detail message
00051         * @param vCause  the underlying cause of the exception
00052         */
00053         NullPointerException(String::View vsMsg = String::null_string,
00054                 Exception::View vCause = NULL);
00055     };
00056 
00057 COH_CLOSE_NAMESPACE2
00058 
00059 #endif // COH_NULL_POINTER_EXCEPTION_HPP
Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.