@@ -44,6 +44,16 @@ def __init__(self, error_message=None):
4444class NoMatchError (RiveScriptError ):
4545 """No reply could be matched.
4646
47+ This means that no trigger was a match for the user's message. To avoid
48+ this error, add a trigger that only consists of a wildcard::
49+
50+ + *
51+ - I do not know how to reply to that.
52+
53+ The lone-wildcard trigger acts as a catch-all fallback trigger and will
54+ ensure that every message the user could send will match at least one
55+ trigger.
56+
4757 The text version is ``[ERR: No reply matched]``
4858 """
4959 def __init__ (self ):
@@ -53,14 +63,25 @@ def __init__(self):
5363class NoReplyError (RiveScriptError ):
5464 """No reply could be found.
5565
66+ This means that the user's message matched a trigger, but the trigger
67+ didn't yield any response for the user. For example, if a trigger was
68+ followed only by ``*Conditions`` and none of them were true and there were
69+ no normal replies to fall back on, this error can come up.
70+
71+ To avoid this error, always make sure you have at least one ``-Reply``
72+ for every trigger.
73+
5674 The text version is ``[ERR: No reply found]``.
5775 """
5876 def __init__ (self ):
5977 super (NoReplyError , self ).__init__ (RS_ERR_REPLY )
6078
6179
6280class ObjectError (RiveScriptError ):
63- """An error occurred when executing a Python object.
81+ """An error occurred when executing a Python object macro.
82+
83+ This will usually be some kind of run-time error, like a
84+ ``ZeroDivisionError`` or ``IndexError`` for example.
6485
6586 The text version is ``[ERR: Error when executing Python object]``
6687 """
@@ -71,6 +92,23 @@ def __init__(self, error_message=RS_ERR_OBJECT):
7192class DeepRecursionError (RiveScriptError ):
7293 """A deep recursion condition was detected and a reply can't be given.
7394
95+ This error can occur when you have triggers that redirect to each other
96+ in a circle, for example::
97+
98+ + one
99+ @ two
100+
101+ + two
102+ @ one
103+
104+ By default, RiveScript will only recursively look for a trigger up to
105+ 50 levels deep before giving up. This should be a large enough window for
106+ most use cases, but if you need to increase this limit you can do so by
107+ setting a higher value for the ``depth`` parameter to the constructor or
108+ changing it in your RiveScript source code, for example::
109+
110+ ! global depth = 75
111+
74112 The text version is ``[ERR: Deep recursion detected]``
75113 """
76114 def __init__ (self ):
0 commit comments