All work

 

CFPARAM throwmessage, with a a throw-type of parameter, or perhaps a settable attribute for throwtype

Description

I have a parameter declared with

param name="url.ObjectID" type="numeric" default="0";

My own code-mistake created a link that looked like objects.cfm?ObjectID= (with no value) which rightfully cause an error on the destination page.

There are a half-dozen ways to go about catching this so that it's not reporting user-errors like this to me, but I was thinking that it would be nice to have something like throwmessage, in this case, I would set

param ... throwmessage="ObjectIDs must contain only numbers."

or perhaps param ... throwmessage="ObjectIDs must contain only numbers" type="noreport"

And then in errortrappying, i'd say

writeoutput(e.message); // in this case 'ObjectIDs must contain only numbers'
if (e.type != "noreport")... //log the error

Basically cfparam rolling in cfthrow.

Details

Assignee

Reporter

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Priority

Created 30 November 2017 at 16:40
Updated 30 November 2017 at 16:40

Activity