LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
line_warning_always.m
1function line_warning_always(caller, MSG, varargin)
2% LINE_WARNING_ALWAYS(CALLER, MSG, ...)
3%
4% Emit a warning without the repeat suppression applied by LINE_WARNING.
5%
6% LINE_WARNING keeps only the last message and hides an identical repeat for
7% 60 seconds. That is right for configuration notices cast once per model, but
8% wrong for a warning that reports a correctness limitation of the analysis:
9% solving several models in one session would then flag only the first one, and
10% the user would read the silence on the others as a clean bill of health.
11% Warnings that say "these numbers are not exact" must be raised for every model
12% they apply to, so they go through here instead. Verbosity gating is unchanged:
13% SILENT still silences everything.
14
15% Copyright (c) 2012-2026, Imperial College London
16% All rights reserved.
17
18if ~coder.target('MATLAB')
19 return; % No-op in codegen mode
20end
21
22if GlobalConstants.Verbose == VerboseLevel.SILENT
23 return
24end
25
26errmsg = sprintf(MSG, varargin{:});
27% '%s\n' rather than passing the assembled string as the format itself: the
28% message carries user-supplied names and must not be reinterpreted as a
29% format specification.
30line_printf('%s\n', sprintf('Warning [%s.m]: %s', caller, errmsg));
31end
Definition Station.m:245