bug 569710: convert traceback.md to apidocs format; r=myk; a0.7=myk
authorNoelle Murata <fiveinchpixie@gmail.com>
Wed, 18 Aug 2010 16:44:56 -0700
changeset 735 5ba38bd91643e5345ea2b2bb42edb001552a4ed2
parent 734 cfa13d9472737e6132b9e67eae2353f777702c15
child 736 1181b2cd0a3578fa8c99d16281d1a1b162634b27
push id266
push usermyk@mozilla.com
push dateWed, 18 Aug 2010 23:45:14 +0000
reviewersmyk
bugs569710
bug 569710: convert traceback.md to apidocs format; r=myk; a0.7=myk
packages/jetpack-core/docs/traceback.md
--- a/packages/jetpack-core/docs/traceback.md
+++ b/packages/jetpack-core/docs/traceback.md
@@ -1,8 +1,12 @@
+<!-- contributed by Atul Varma [atul@mozilla.com]  -->
+<!-- edited by Noelle Murata [fiveinchpixie@gmail.com]  -->
+
+
 The `traceback` module contains functionality similar to
 Python's [traceback] module.
 
 ## JSON Traceback Objects ##
 
 Tracebacks are stored in JSON format. The stack is represented as an
 array in which the most recent stack frame is the last element; each
 element thus represents a stack frame and has the following keys:
@@ -21,27 +25,43 @@ element thus represents a stack frame an
     <td>The name of the function being executed at the stack frame, or
     <code>null</code> if the function is anonymous or the stack frame is
     being executed in a top-level script or module.</td>
   </tr>
 </table>
 
 ## Functions ##
 
-<code>traceback.**fromException**(*exception*)</code>
+<api name="fromException">
+@method
+  Attempts to extract the traceback from *`exception`*.
 
-Attempts to extract the traceback from *exception*, returning the
-JSON representation of the traceback or `null` if no traceback
-could be extracted.
+@returns {traceback}
+  JSON representation of the traceback or `null` if not found.
+
+@param exception {exception}
+  exception where exception is an `nsIException`.
+</api>
+
+See [nsIException] for more information.
 
-<code>traceback.**get**()</code>
+[nsIException]: https://developer.mozilla.org/en/NsIException
+
+<api name="get">
+@method
 
-Returns the JSON representation of the stack at the point that this
-function is called.
+@returns {JSON}
+  Returns the JSON representation of the stack at the point that this
+  function is called.
+</api>
 
-<code>traceback.**format**([*tbOrException*])</code>
-
+<api name="format">
+@method
 Given a JSON representation of the stack or an exception instance,
 returns a formatted plain text representation of it, similar to
 Python's formatted stack tracebacks.  If no argument is provided, the
 stack at the point this function is called is used.
 
+@param [tbOrException] {object}
+</api>
+
+
   [traceback]: http://docs.python.org/library/traceback.html