From: <ndi...@us...> - 2002-09-03 23:03:24
|
Update of /cvsroot/modus/org/bacfug/modus/errors In directory usw-pr-cvs1:/tmp/cvs-serv30967/bacfug/modus/errors Modified Files: baseerror.cfc Log Message: the init method should return itself, so that you can do: foo = createObject("component","error").init(); Index: baseerror.cfc =================================================================== RCS file: /cvsroot/modus/org/bacfug/modus/errors/baseerror.cfc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** baseerror.cfc 3 Sep 2002 22:34:32 -0000 1.3 --- baseerror.cfc 3 Sep 2002 23:03:20 -0000 1.4 *************** *** 2,6 **** <cfparam name="instance" default="#structNew()#"> <!--- init, to set type, message, detail ---> ! <cffunction name="init" access="public" output="no" hint="initialize the error" returnType="void"> <cfargument name="message" required="no" default="#instance.message#" type="string"> <cfargument name="type" required="no" default="#instance.type#" type="string"> --- 2,6 ---- <cfparam name="instance" default="#structNew()#"> <!--- init, to set type, message, detail ---> ! <cffunction name="init" access="public" output="no" hint="initialize the error" returnType="org.bacfug.modus.errors.baseError"> <cfargument name="message" required="no" default="#instance.message#" type="string"> <cfargument name="type" required="no" default="#instance.type#" type="string"> *************** *** 17,20 **** --- 17,21 ---- setDetail(arguments.detail); </cfscript> + <cfreturn this> </cffunction> <!--- getter and setter for type ---> |