FatalErrorIfFailedMTL.mm 435 B

1234567891011121314
  1. // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
  2. // SPDX-FileCopyrightText: 2025 Jorrit Rouwe
  3. // SPDX-License-Identifier: MIT
  4. #include <TestFramework.h>
  5. #include <Renderer/MTL/FatalErrorIfFailedMTL.h>
  6. #include <Utils/Log.h>
  7. void FatalErrorIfFailed(NSError *inResult)
  8. {
  9. if (inResult != nullptr)
  10. FatalError("Metal error returned: %s", [[inResult localizedDescription] cStringUsingEncoding: NSUTF8StringEncoding]);
  11. }