RejitException.h 824 B

123456789101112131415161718192021222324252627282930
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. namespace Js
  7. {
  8. class RejitException : public ExceptionBase
  9. {
  10. private:
  11. const RejitReason reason;
  12. public:
  13. RejitException(const RejitReason reason) : reason(reason)
  14. {
  15. }
  16. public:
  17. RejitReason Reason() const
  18. {
  19. return reason;
  20. }
  21. const char *ReasonName() const
  22. {
  23. return RejitReasonNames[static_cast<byte>(reason)];
  24. }
  25. };
  26. }