rodel30
07/20/2023, 9:12 PMtry{ callAFunction() } catch ( any e ){ if( Left(e.message, n) == stringhere ) { ... } }
and it's now throwing an error of java.util.MissingResourceException: Can't find resource for base name coldfusion/runtime/CfJspPage.NoSuchTemplateException.properties
on the if
conditional (which seems most likely to be the e.message
bit). Did the argument passed to catch
change?jakobward
07/20/2023, 10:17 PMrodel30
07/20/2023, 10:18 PMrstewart
07/20/2023, 10:45 PMrodel30
07/20/2023, 10:47 PMrstewart
07/20/2023, 10:52 PMrodel30
07/20/2023, 10:56 PMjakobward
07/20/2023, 10:57 PMrodel30
07/20/2023, 10:57 PMjakobward
07/20/2023, 10:58 PMrodel30
07/20/2023, 10:59 PMrodel30
07/20/2023, 11:00 PMrodel30
07/20/2023, 11:00 PMrstewart
07/20/2023, 11:01 PMDave Merrill
07/21/2023, 12:31 PMrodel30
07/21/2023, 2:17 PM<!--- Railo/Lucee has its own built-in function for clearing the template
cache. Adobe ColdFusion uses the Admin API. --->
<cffunction name="clearTemplateCache" returntype="void" output="no">
<cfargument name="cfadminPassword" type="string" required="true">
<cftry>
<cfif IsDefined('pagePoolClear')>
<cfset pagePoolClear()>
<cfelse>
<cfset CreateObject('component', 'CFIDE.adminapi.administrator').login(arguments.cfadminPassword)>
<cfset CFIDE = CreateObject('component', 'CFIDE.adminapi.runtime')>
<cfset CFIDE.clearTrustedCache()>
</cfif>
<cfcatch>
<cfthrow message="Failed to clear ColdFusion Trusted Template Cache. Check that CFadmin password matches."
detail="#cfcatch.message#: #cfcatch.detail#">
</cfcatch>
</cftry>
</cffunction>
Dave Merrill
07/21/2023, 7:03 PMrodel30
07/21/2023, 7:21 PM