Sending AngularJS $log.error() messages into Cobalt ErrorGUI?

In WestlawNext, a `Cobalt.Error` or (unhandled exceptions via `window.onerrror`) would flow through the Website module into ErrorGUi. In AngularJS, [$log][1] and [$exceptionHandler][2] are defined and can be used. Similar to [Enhancing AngularJS Logging using Decorators][3], are they any examples in Cobalt of enhancing $log to send errors to the server and into ErrorGUI? [1]:
https://docs.angularjs.org/api/ng/service/$log [2]:
https://docs.angularjs.org/api/ng/service/$exceptionHandler [3]:
http://solutionoptimist.com/2013/10/07/enhance-angularjs-logging-using-decorators/

Answers

  • It looks like Drafting Assistant is using `$log` extensively. They have a custom wrapper around `$log` which will post errors to Website for logging. I believe they are using a custom endpoint for logging these errors (vs. using the platform one). Take a look at the following file on Cobalt's TFS instance: $\Cobalt Static Content\Development\StaticContent\site\Products\Drafting.Westlaw\wsf\plc\js\draftingCommon\errorHandling\dcErrorLogClient.js Here is a link to the file (and a related one) via the TFS web interface: [Drafting Assistant error handling services][1] [1]:
    http://tfsnpt.int.thomson.com:8080/tfs/web/UI/Pages/Scc/
    Explorer.aspx?pguid=60798db5-fb71-4793-a6b6-79e322749a57#path=%24%2FCobalt%20Static%20Content%2FDevelopment%2FStaticContent%2Fsite%2FProducts%2FDrafting.Westlaw%2Fwsf%2Fplc%2Fjs%2FdraftingCommon%2FerrorHandling