The correct format from SWI-Prolog.h
is
int PL_warning(const char *fmt, ...);
Did you know ... | Search Documentation: |
Errors and warnings |
PL_warning()
prints a standard Prolog warning message to the standard error (user_error
)
stream. Please note that new code should consider using PL_raise_exception()
to raise a Prolog exception. See also section
4.10.
[WARNING:
’,
followed by the output from format, followed by a‘]
’and
a newline. Then start the tracer. format and the arguments
are the same as for printf(2). Always returns FALSE
.[FATAL ERROR: at <time> ...]
and
terminates the process after cleanup using abort(). If the
process is a Windows GUI application it uses a message box. This
function should be used if an unrepairable error is detected. For
example, Prolog uses it to signal it cannot find the compiled Prolog
startup or memory allocation fails in a place from where we cannot
gracefully generate an exception.232Currently
most memory allocation except for most of the big allocations such as
for the Prolog stacks.[PROLOG SYSTEM ERROR: ...]
and provides
additional technical details such as the thread that trapped the error
and backtrace of the C and Prolog stacks. This function should be used
to when an unexpected and unrepairable error is detected. For example,
Prolog uses this after it finds an inconsistency in the data during
garbage collection.
The correct format from SWI-Prolog.h
is
int PL_warning(const char *fmt, ...);