doneprintHandle.js 601 B

12345678910111213141516171819202122
  1. // Copyright (C) 2017 Ecma International. All rights reserved.
  2. // This code is governed by the BSD license found in the LICENSE file.
  3. /*---
  4. description: |
  5. ---*/
  6. function __consolePrintHandle__(msg) {
  7. print(msg);
  8. }
  9. function $DONE(error) {
  10. if (error) {
  11. if(typeof error === 'object' && error !== null && 'name' in error) {
  12. __consolePrintHandle__('Test262:AsyncTestFailure:' + error.name + ': ' + error.message);
  13. } else {
  14. __consolePrintHandle__('Test262:AsyncTestFailure:Test262Error: ' + error);
  15. }
  16. } else {
  17. __consolePrintHandle__('Test262:AsyncTestComplete');
  18. }
  19. }