addWorkunitWarning.xml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <sect1 id="addWorkunitWarning">
  5. <title>addWorkunitWarning</title>
  6. <para><emphasis role="bold">STD.System.Log.addWorkunitWarning<indexterm>
  7. <primary>STD.System.Log.addWorkunitWarning</primary>
  8. </indexterm> <indexterm>
  9. <primary>System.Log.addWorkunitWarning</primary>
  10. </indexterm> <indexterm>
  11. <primary>Log.addWorkunitWarning</primary>
  12. </indexterm> <indexterm>
  13. <primary>addWorkunitWarning</primary>
  14. </indexterm>(</emphasis> <emphasis> text </emphasis><emphasis
  15. role="bold">[</emphasis> <emphasis>, code </emphasis><emphasis role="bold">]
  16. )</emphasis></para>
  17. <informaltable colsep="0" frame="none" rowsep="0">
  18. <tgroup cols="2">
  19. <colspec colwidth="80.50pt" />
  20. <colspec />
  21. <tbody>
  22. <row>
  23. <entry><emphasis>text</emphasis></entry>
  24. <entry>A string containing the text to write.</entry>
  25. </row>
  26. <row>
  27. <entry><emphasis>code</emphasis></entry>
  28. <entry>Optional. The code number to associate with the
  29. <emphasis>text</emphasis>. If omitted, the default is zero
  30. (0).</entry>
  31. </row>
  32. <row>
  33. <entry>Return:</entry>
  34. <entry>addWorkunitWarning does not return a value.</entry>
  35. </row>
  36. </tbody>
  37. </tgroup>
  38. </informaltable>
  39. <para>The <emphasis role="bold">addWorkunitWarning </emphasis>function
  40. writes the <emphasis>text</emphasis> string to the eclagent.log file for the
  41. workunit, and also displays the <emphasis>code</emphasis> and
  42. <emphasis>text</emphasis> in the Syntax Errors toolbox along with the
  43. Warnings section of the ECL Watch page for the workunit.</para>
  44. <para>Example:</para>
  45. <programlisting format="linespecific">IMPORT STD;
  46. STD.System.Log.addWorkunitWarning('Got Here',1);
  47. //write text to log and display "1: Got Here" in Warnings
  48. </programlisting>
  49. </sect1>