Exception.h 748 B

12345678910111213141516171819202122232425
  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. class Exception
  8. {
  9. friend JsUtil::ExternalApi;
  10. private:
  11. enum {
  12. ExceptionKind_OutOfMemory,
  13. ExceptionKind_StackOverflow
  14. };
  15. static bool RaiseIfScriptActive(ScriptContext *scriptContext, unsigned kind, PVOID returnAddress = NULL);
  16. static void RecoverUnusedMemory();
  17. };
  18. }