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)
@@ -574,3 +574,17 @@ function as_duals(p::MTKParameters, dualtype)
574
574
discrete = dualtype .(p. discrete)
575
575
return MTKParameters {typeof(tunable), typeof(discrete)} (tunable, discrete)
576
576
end
577
+
578
+ const MISSING_PARAMETERS_MESSAGE = """
579
+ Some parameters are missing from the variable map.
580
+ Please provide a value or default for the following variables:
581
+ """
582
+
583
+ struct MissingParametersError <: Exception
584
+ vars:: Any
585
+ end
586
+
587
+ function Base. showerror (io:: IO , e:: MissingParametersError )
588
+ println (io, MISSING_PARAMETERS_MESSAGE)
589
+ println (io, e. vars)
590
+ end
You can’t perform that action at this time.
0 commit comments