Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fc-pregmod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
macaronideath
fc-pregmod
Commits
7819067c
Commit
7819067c
authored
3 years ago
by
Arkerthan
Browse files
Options
Downloads
Patches
Plain Diff
Better error message when RA custom conditions fail.
parent
d579da9f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/js/rulesAssistant.js
+6
-1
6 additions, 1 deletion
src/js/rulesAssistant.js
with
6 additions
and
1 deletion
src/js/rulesAssistant.js
+
6
−
1
View file @
7819067c
...
@@ -151,7 +151,12 @@ globalThis.ruleAppliesP = function(rule, slave) {
...
@@ -151,7 +151,12 @@ globalThis.ruleAppliesP = function(rule, slave) {
break
;
break
;
case
"
custom
"
:
// user provided JS function
case
"
custom
"
:
// user provided JS function
// TODO: This should use a cached Function instead of 'eval'ing
// TODO: This should use a cached Function instead of 'eval'ing
flag
=
eval
(
cond
.
data
)(
slave
);
try
{
flag
=
eval
(
cond
.
data
)(
slave
);
}
catch
(
e
)
{
// Put together a more useful message for the player. Does mean we are losing the stacktrace.
throw
new
Error
(
`Rule '
${
rule
.
name
}
' custom condition failed: '
${
e
.
message
}
'`
);
}
break
;
break
;
}
}
if
(
!
flag
)
{
if
(
!
flag
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment