-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#553 implemented. catch variables are no longer false flags
- Loading branch information
1 parent
2957314
commit c7134bc
Showing
5 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/test/resources/com/cflint/tests/VarScoper/553_catch.cfc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
component { | ||
public string function renderPage( required any page, required any docTree, required boolean edit ){ | ||
try { | ||
var renderedPage = renderTemplate( | ||
template = "templates/#_getPageLayoutFile( arguments.page )#.cfm" | ||
, args = { page = arguments.page, docTree=arguments.docTree, edit=edit } | ||
, helpers = "/builders/html/helpers" | ||
); | ||
} catch( any e ) { | ||
e.additional.luceeDocsPageId = arguments.page.getid(); | ||
rethrow; | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/test/resources/com/cflint/tests/VarScoper/553_catch.expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"version" : "", | ||
"timestamp" : 1513437208, | ||
"issues" : [ ], | ||
"counts" : { | ||
"totalFiles" : 0, | ||
"totalLines" : 0, | ||
"countByCode" : [ ], | ||
"countBySeverity" : [ ] | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/test/resources/com/cflint/tests/VarScoper/553_cfml_catch.cfc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<cfcomponent> | ||
<cffunction name="foo"> | ||
<cftry> | ||
<cfcatch name="e"> | ||
<cfset e.additional.luceeDocsPageId = 1/> | ||
</cfcatch> | ||
</cftry> | ||
</cffunction> | ||
</cfcomponent> |
11 changes: 11 additions & 0 deletions
11
src/test/resources/com/cflint/tests/VarScoper/553_cfml_catch.expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"version" : "", | ||
"timestamp" : 1525483036, | ||
"issues" : [ ], | ||
"counts" : { | ||
"totalFiles" : 0, | ||
"totalLines" : 0, | ||
"countByCode" : [ ], | ||
"countBySeverity" : [ ] | ||
} | ||
} |