[Jspro-cvs] jsPro error.js,1.14,1.15
Brought to you by:
wigleys
|
From: <gat...@us...> - 2003-09-22 04:41:13
|
Update of /cvsroot/jspro/jsPro
In directory sc8-pr-cvs1:/tmp/cvs-serv24889
Modified Files:
error.js
Log Message:
new exception - IllegalValueException(sMethodName, sVariableName, vExpectedVal, vActualVal)
Index: error.js
===================================================================
RCS file: /cvsroot/jspro/jsPro/error.js,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** error.js 14 Sep 2003 09:37:53 -0000 1.14
--- error.js 22 Sep 2003 04:41:10 -0000 1.15
***************
*** 134,137 ****
--- 134,162 ----
/**
+ * Creates an object that is a subclass of Error for handling IllegalValue
+ * exceptions.
+ *
+ * @author Randolph Fielding
+ * @version 1.0, 09/22/03
+ * @interface <code>new IllegalValueException(sMethodName,
+ * sVariableName, vExpectedVal, vActualVal)</code>
+ * @param sMethodName the name of the method where the exception was thrown
+ * @param sVariableName the name of the variable containing the illegal value
+ * @param vExpectedVal the value expected in the variable containing the
+ * illegal value
+ * @param vActualVal the value currently in the variable containing the
+ * illegal value
+ */
+ function IllegalValueException(sMethodName, sVariableName, vExpectedVal, vActualVal) {
+
+ this.name = 'IllegalValueException';
+ this.message = sMethodName + ' has encountered an illegal value in variable ' + sVariableName + '.'
+ this.debug = 'Expected a value of ' + vExpectedVal.toString() + ', but contains a value of ' + vActualVal.toString() + '.'
+ }
+
+ IllegalValueException.prototype = new Error();
+
+
+ /**
* Creates an object that is a subclass of Error for handling
* MethodNotAvailable exceptions.
|