tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

pr_seterrortext.rst (1100B)


      1 PR_SetErrorText
      2 ===============
      3 
      4 Sets the text associated with an error.
      5 
      6 
      7 Syntax
      8 ------
      9 
     10 .. code::
     11 
     12   #include <prerror.h>
     13 
     14   void PR_SetErrorText(PRIntn textLength, const char *text)
     15 
     16 
     17 Parameters
     18 ~~~~~~~~~~
     19 
     20 The function has these parameters:
     21 
     22 ``textLength``
     23   The length of the text in the ``text``. May be ``NULL``. If not
     24   ``NULL``, and if ``text`` is zero, the string is assumed to be a
     25   null-terminated C string. Otherwise the text is assumed to be the
     26   length specified and to possibly include ``NULL`` characters (as
     27   might occur in a multilingual string).
     28 
     29 ``text``
     30   The text to associate with the error.
     31 
     32 
     33 Description
     34 -----------
     35 
     36 The text is copied into the thread structure and remains there until the
     37 next call to :ref:`PR_SetError`. If there is error text already present in
     38 the thread, the previous value is first deleted. The new value is copied
     39 into storage allocated and owned by NSPR and remains there until the
     40 next call to :ref:`PR_SetError` or another call to :ref:`PR_SetErrorText`.
     41 
     42 NSPR makes no use of this function. Clients may use it for their own
     43 purposes.