--[[
debug_crash_example.lua

Demonstrates the ecs.debug_crash() function which prints a message
and then deliberately crashes the application via std::abort().

Usage:
  ecs.debug_crash("message")  -- prints message and crashes
  ecs.debug_crash()           -- uses default message "debug_crash called"

WARNING: This function will terminate the application!
]]

-- Example 1: Crash with a custom message
-- Uncomment to test:
-- ecs.debug_crash("Something went terribly wrong!")

-- Example 2: Crash with default message
-- Uncomment to test:
-- ecs.debug_crash()

-- Example 3: Conditional crash for debugging
-- local health = ecs.get_field(player_id, 'Character', 'health')
-- if health <= 0 then
--     ecs.debug_crash("Player health dropped to zero!")
-- end

print("debug_crash example loaded (not executed - uncomment to test)")
