01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: * $Header:$
18: */
19: package org.apache.beehive.netui.tags.databinding.invoke;
20:
21: /**
22: * An exception thrown when an object on which to invoke a method can not
23: * be found. The {@link CallMethod#resolveObject()} call throws this exception.
24: */
25: public class ObjectNotFoundException extends Exception {
26:
27: private String _objectName = null;
28:
29: /**
30: * Construct an ObjectNotFoundException.
31: */
32: public ObjectNotFoundException() {
33: super ();
34: }
35:
36: /**
37: * Construct an ObjectNotFoundException with the given message.
38: *
39: * @param message a String containing the text of the exception message
40: */
41: public ObjectNotFoundException(String message) {
42: super (message);
43: }
44:
45: /**
46: * Construct an ObjectNotFoundException with the given cause
47: *
48: * @param cause a <code>Throwable</code> that interfered with the normal lookup of an object.
49: */
50: public ObjectNotFoundException(Throwable cause) {
51: super (cause);
52: }
53:
54: /**
55: * Construct an ObjectNotFoundException with the given <code>message</code> and <code>cause</code>.
56: *
57: * @param message a String containing the text of the exception message
58: * @param cause a <code>Throwable</code> that interfered with the normal lookup of an object.
59: */
60: public ObjectNotFoundException(String message, Throwable cause) {
61: super (message, cause);
62: }
63:
64: /**
65: * Construct an ObjectNotFoundException with the given <code>message</code>, <code>cause</code>, and <code>objectName</code>.
66: *
67: * @param message a String containing the text of the exception message
68: * @param cause a <code>Throwable</code> that interfered with the normal lookup of an object.
69: * @param objectName the identifier of the object which could not be looked-up.
70: */
71: public ObjectNotFoundException(String message, Throwable cause,
72: String objectName) {
73: super (message, cause);
74: _objectName = objectName;
75: }
76:
77: /**
78: * Get the name of the object whose lookup failed.
79: *
80: * @return the String name
81: */
82: public String getObjectName() {
83: return _objectName;
84: }
85: }
|