ErrorUtils.js 570 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. /**
  3. * Copyright (c) 2013-present, Facebook, Inc.
  4. *
  5. * This source code is licensed under the MIT license found in the
  6. * LICENSE file in the root directory of this source tree.
  7. *
  8. */
  9. /* jslint unused:false */
  10. if (global.ErrorUtils) {
  11. module.exports = global.ErrorUtils;
  12. } else {
  13. var ErrorUtils = {
  14. applyWithGuard: function applyWithGuard(callback, context, args, onError, name) {
  15. return callback.apply(context, args);
  16. },
  17. guard: function guard(callback, name) {
  18. return callback;
  19. }
  20. };
  21. module.exports = ErrorUtils;
  22. }