Quantcast
Channel: Add optional abort Attribute to cfinclude
Browsing latest articles
Browse All 40 View Live

Add optional abort Attribute to cfinclude

@isapir wrote: I wanted to propose an optional attribute, abort, to the cfinclude tag, which will work similarly to abort in cfdump. many times I find myself doing something like: <cfinclude...

View Article


Add optional abort Attribute to cfinclude

@adam_cameron wrote: A piece of functionality should do one thing (preferably with its name describing that functionality). In the case of include, it should… include. If you need to add an and into...

View Article


Add optional abort Attribute to cfinclude

@modius wrote: Hmm… interesting. Never knew you could do <cfdump abort="true"> (since CF9 to boot). <cfdump var = "#variable#" output = "browser|console|file" format = "text|html" abort =...

View Article

Add optional abort Attribute to cfinclude

@isapir wrote: While I’d argue that its appropriate in cfdump as its a tool for debugging, I’m not convinced its appropriate in cfinclude many times you want to pass the code to another template and...

View Article

Add optional abort Attribute to cfinclude

@agentK wrote: Fully agree with @adam_cameron - this should NOT be implemented at all. Edit: I’d actually even argue that cfdump shouldn’t have an abort attribute, but I can see why that’s useful...

View Article


Add optional abort Attribute to cfinclude

@micstriit wrote: From an architectual standpoint I have to agree with Kai and Adam, I never like tags/functions that mix in of unrelated functionality. Like: cfdump-abort cferror-mail createObject I...

View Article

Image may be NSFW.
Clik here to view.

Add optional abort Attribute to cfinclude

@isapir wrote: micstriit: So from an architectual standpoint clearly no, but from a pragmatic one I’m undecided. right. I was going for pragmatic. there are many use cases for this, e.g. a template...

View Article

Add optional abort Attribute to cfinclude

@apenhorwood wrote: makes since because it is a quick use debugging tool. It is not meant to be left in the code past development. is not a debugging tool and should not have an abort attribute. I...

View Article


Add optional abort Attribute to cfinclude

@agentK wrote: 21Solutions: right. I was going for pragmatic. You were going for pragmatic for a use case that promotes bad practice in the majority of cases. There are a lot of “pragmatic” things a...

View Article


Add optional abort Attribute to cfinclude

@dajester2013 wrote: 21Solutions: <cfcode goes here> <cfif (!isValid)> <cfinclude template="/invalid_parameters.cfml" abort="true> </cfif> <cfcode of template continues...

View Article

Image may be NSFW.
Clik here to view.

Add optional abort Attribute to cfinclude

@isapir wrote: dajester2013: I had a professor that would fail an assignment if there was a function with two return statements as in the first example if I had lived in the theoretical world like...

View Article

Image may be NSFW.
Clik here to view.

Add optional abort Attribute to cfinclude

@agentK wrote: dajester2013: While sometimes necessary, using aborts as a normal way to end a request is, IMO, bad practice. It should be treated more like exit(1) for C programs. yes! (and some more...

View Article

Image may be NSFW.
Clik here to view.

Add optional abort Attribute to cfinclude

@modius wrote: Given that you can already exit on a template (as @21Solutions points out elsewhere) : <cfexit method="ExitTemplate"> Are you actually advocating for something break related as...

View Article


Add optional abort Attribute to cfinclude

@kliakos wrote: Bear in mind that when you use abort, the code execution will never reach the OnRequestEnd() method. Abort is a hard exit to stop execution of everything. Read full topic

View Article

Image may be NSFW.
Clik here to view.

Add optional abort Attribute to cfinclude

@agentK wrote: kliakos: Bear in mind that when you use abort, the code execution will never reach the OnRequestEnd() method. Abort is a hard exit to stop execution of everything. I think you’re spot...

View Article


Image may be NSFW.
Clik here to view.

Add optional abort Attribute to cfinclude

@justincarter wrote: If both of these are the same, but you can already do the first one without changing any of the engine code, then I’d be in favour of sticking with what we already have...

View Article

Image may be NSFW.
Clik here to view.

Add optional abort Attribute to cfinclude

@isapir wrote: agentK: Or if he’s too lazy to type it sure Kai, I’m too lazy. that’s why I spent time posting this here instead of creating a simple custom tag that overrides the default behavior of...

View Article


Add optional abort Attribute to cfinclude

@seancorfield wrote: I think there’s a fundamental philosophical decision that LAS need to make about Lucee: Is Lucee meant to be a language that enshrines best practices to appeal to a broader range...

View Article

Image may be NSFW.
Clik here to view.

Add optional abort Attribute to cfinclude

@agentK wrote: 21Solutions: agentK: Or if he’s too lazy to type it sure Kai, I’m too lazy. that’s why I spent time posting this here instead of creating a simple custom tag that overrides the default...

View Article

Add optional abort Attribute to cfinclude

@seancorfield wrote: Extending the “quick’n’dirty” thinking further could take you into Ruby territory with conditional execution: <:include template="/path/to/file.lucee" exit="true"...

View Article
Browsing latest articles
Browse All 40 View Live