File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ function MTKParameters(
70
70
end
71
71
end
72
72
73
- isempty (missing_params) || throw (MissingVariablesError (collect (missing_params)))
73
+ isempty (missing_params) || throw (MissingParametersError (collect (missing_params)))
74
74
75
75
tunable_buffer = Tuple (Vector {temp.type} (undef, temp. length)
76
76
for temp in ic. tunable_buffer_sizes)
@@ -575,3 +575,17 @@ function as_duals(p::MTKParameters, dualtype)
575
575
discrete = dualtype .(p. discrete)
576
576
return MTKParameters {typeof(tunable), typeof(discrete)} (tunable, discrete)
577
577
end
578
+
579
+ const MISSING_PARAMETERS_MESSAGE = """
580
+ Some parameters are missing from the variable map.
581
+ Please provide a value or default for the following variables:
582
+ """
583
+
584
+ struct MissingParametersError <: Exception
585
+ vars:: Any
586
+ end
587
+
588
+ function Base. showerror (io:: IO , e:: MissingParametersError )
589
+ println (io, MISSING_PARAMETERS_MESSAGE)
590
+ println (io, e. vars)
591
+ end
You can’t perform that action at this time.
0 commit comments