Skip to content

Commit d3018b5

Browse files
author
Steven Wexler
committed
Updating README to be in sync with throwIf, reportIf, options, and report documentation changes.
1 parent 630cd8f commit d3018b5

1 file changed

Lines changed: 20 additions & 4 deletions

File tree

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ exceptions.js adds the exceptions property to the window object which exposes:
6565
| TypeException | An exception inherited from Exception that is useful for throwing or reporting exceptions related to type errors |
6666
| URIException | An exception inherited from Exception that is useful for throwing or reporting exceptions related to URI errors |
6767
| createCustomException | Function you can use to create custom functions. ArgumentException, InvalidOperationException, and NotImplementedException are all created with createCustomException |
68+
| throwIf | Shorthand method to invoke Exception.throwIf. Use this function to conditionally throw exceptions. |
69+
| reportIf | Shorthand method to invoke Exception.reportIf. Use this function to conditionally throw exceptions. |
6870

6971
### Exception
7072

@@ -212,7 +214,7 @@ _return_
212214
213215
###### report
214216
215-
Report the exception (without throwing it). Reporting an exception involves making a post request with a serialized exception object if the post option is enabled and/or executing a callback if the callback option is enabled. The post request uses the url returned from exception.handler.reportUrl() and headers returned from exception.handler.postHeaders(). It will not make a post request if no url is specified. The callback will execute the function returned from exceptions.handlers.callback and will not execute the callback if no function is specified.
217+
Report the exception (without throwing it). Reporting an exception involves making a post request with a serialized exception object if the post request option is enabled, posting to the exception.js platform, and/or executing a custom report function if the report callback option is enabled.
216218
217219
218220
###### toSerializableObject
@@ -473,7 +475,7 @@ Helper function to get the count of reported exceptions (see handler.reportedExc
473475
| seconds | int | no | Last number of seconds for which we care to count exceptions. If not specified, we'll use the total number of exceptions reported since the exception handler was setup.|
474476
475477
##Options
476-
Options for an exception. Options include retrieving a stacktrace, printing a screenshot, posting a serialized JSON representation of an exception to a specified url when the exception is reported, and/or excecuting a callback that recieves the exception when the exception is reported.
478+
Options for an exception. Options include retrieving a stacktrace, printing a screenshot, posting a serialized JSON representation of an exception to a specified url when the exception is reported, posting a request to the exceptionsjs platform, and/or excecuting a reportCallback that receives the exception when the exception is reported.
477479
478480
##### methods
479481
@@ -517,14 +519,14 @@ _return_
517519
| Options|bool | Options object if enable is defined, value of the post option if enable is not defined. |
518520
519521
###### reportCallback
520-
Get or set the retrieve callback option.
522+
Get or set the report callback option.
521523
522524
| Parameter | Type | Required | Description |
523525
| --------- | ---- | -------- | ----------- |
524526
| enable | bool | no | Return the current option if undefined. Enable the callback option if enable is true. Disable the callback option if enable is false. |
525527
526528
###### reportToExceptionsJsPlatform
527-
Get or set the retrieve report to exceptionsjs platform option.
529+
Get or set the report to exceptionsjs platform option.
528530
529531
| Parameter | Type | Required | Description |
530532
| --------- | ---- | -------- | ----------- |
@@ -536,6 +538,20 @@ _return_
536538
| ---- | ----------- |
537539
| Options|bool | Options object if enable is defined, value of the callback option if enable is not defined. |
538540
541+
###### DOMDump
542+
Get or set the DOM dump option.
543+
544+
| Parameter | Type | Required | Description |
545+
| --------- | ---- | -------- | ----------- |
546+
| enable | bool | no | Return the current option if undefined. Enable the DOM dump option if enable is true. Disable the DOM dump option if enable is false. |
547+
548+
_return_
549+
550+
| Type | Description |
551+
| ---- | ----------- |
552+
| Options|bool | ptions object if enable is defined, value of the DOM dump option if enable is not defined. |
553+
554+
539555
###### toggleAll
540556
Toggle all options according to the enable parameter
541557

0 commit comments

Comments
 (0)