aws/aws-sdk-js — pull request #88 by cjhanks (2013-03-28 19:30:18+00:00)
Title: Adding of Node.JS Domains to Error Handling Broke Simpleworkflow

It was in https://github.com/aws/aws-sdk-js/issues/74 that domains were added to exception handling. The existence of a domain is tested by checking the running context (this.domain) in the sequential_executor, however calls are regularly made into the AWS.SequentialExecutor object in which the context is not of the proper object (a problem all to itself), coincidentally the SimpleWorkflow often has a `domain` object attached to the request. When exceptions are thrown it is not uncommon for it to find this string. Therefore all if statements `if (this.domain)` have had type-checking added. Since the require('domain') was included in this file on a context-only basis, the same notation was used throughout.