Expose the 'warning' function, and added a similar 'error' function.

Add documentation.
This commit is contained in:
Twan van Laarhoven
2020-04-23 20:22:43 +02:00
parent e9456eea86
commit 8f8e2cea65
4 changed files with 55 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
Function: warning
DOC_MSE_VERSION: since 2.0.1
--Usage--
> warning(some_string)
Output a warning message.
--Parameters--
! Parameter Type Description
| @input@ [[type:string]] Message
| @condition@ [[type:boolean]] (optional) Only show the message if this condition holds.
--Examples--
> warning("message")" # the message is shown in the console panel
> warning("message", condition: false) # shows no message
--See also--
| [[fun:assert]] Check that the condition is @true@. Shows a warning message if it is not.
| [[fun:error]] Output an error message.