Last Friday, my boss told me that I need to cooperate my module into other team's huge project called HIS (Hospital Information System) about displaying patient's photograph. That's why I needed to review their existing coding and needed to know the image path (directory). In this coding, I've found the following funny usage about cfimage within cftry/cfcatch.
2 <cfimage
3 action = "info"
4 source = "#image_dir_path##myimage#"
5 structname = "my_img">
6 <cfcatch>
7 <cfset error_msg = "#cfcatch.message#">
8 </cfcatch>
9</cftry>
If I'm not mistaken, the purpose of above coding is the error message will be shown if no image found. As my experience, don't need to use cfimage, cftry, cfcatch tags if we need to check whether the image is existed or not. Just simple to use FileExists. It's very useful and don't need to write that much coding like above.
Here is very simple and useful for checking file/image exists or not.
2 <cfset error_message = "Image file doesn't exist.">
3</cfif>

Android
Top of Page