JSEvents.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
  2. // Please see LICENSE.md in repository root for license information
  3. // https://github.com/AtomicGameEngine/AtomicGameEngine
  4. #pragma once
  5. #include <Atomic/Core/Object.h>
  6. namespace Atomic
  7. {
  8. /*
  9. name standard Name of error, e.g. TypeError, inherited
  10. message standard Optional message of error, own property, empty message inherited if absent
  11. fileName Rhino Filename related to error source, inherited accessor
  12. lineNumber Rhino Linenumber related to error source, inherited accessor
  13. stack V8 Traceback as a multi-line human redable string, inherited accessor
  14. */
  15. EVENT(E_JSOBJECTADDED, ObjectAdded)
  16. {
  17. PARAM(P_OBJECT, Object); // object
  18. }
  19. EVENT(E_JSOBJECTREMOVED, ObjectRemoved)
  20. {
  21. PARAM(P_OBJECT, Object); // object
  22. }
  23. EVENT(E_JSERROR, JSError)
  24. {
  25. PARAM(P_ERRORNAME, ErrorName); // string
  26. PARAM(P_ERRORMESSAGE, ErrorMessage); // string
  27. PARAM(P_ERRORFILENAME, ErrorFileName); // string
  28. PARAM(P_ERRORLINENUMBER, ErrorLineNumber); // int
  29. PARAM(P_ERRORSTACK, ErrorStack); // string
  30. }
  31. EVENT(E_JSPRINT, JSPrint)
  32. {
  33. PARAM(P_TEXT, Text); // string
  34. }
  35. }