main.js 596 B

1234567891011121314151617181920212223242526272829303132
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. 'use strict';
  5. try {
  6. require('./not-found');
  7. }
  8. catch (e1) {
  9. exports.firstError = e1;
  10. // It should throw again and not be cached
  11. try {
  12. require('./not-found');
  13. }
  14. catch (e2) {
  15. exports.secondError = e2;
  16. }
  17. }
  18. try {
  19. require('./file.json');
  20. }
  21. catch (e) {
  22. exports.invalidJSON1 = e;
  23. try {
  24. require('./file.json');
  25. }
  26. catch (e) {
  27. exports.invalidJSON2 = e;
  28. }
  29. }