love.releaseerrhand

Removed in LÖVE 0.9.0
This callback is not supported in that and later versions.

Function

Synopsis

love.releaseerrhand( msg )

Arguments

string msg
The error message.

Returns

Nothing.

Examples

The default function used if you don't supply your own.

function love.releaseerrhand(msg)
	print("An error has occured, the game has been stopped.")

	if not love.graphics or not love.event or not love.graphics.isCreated() then
		return
	end

	love.graphics.setCanvas()
	love.graphics.setPixelEffect()

	-- Load.
	if love.audio then love.audio.stop() end
	love.graphics.reset()
	love.graphics.setBackgroundColor(89, 157, 220)
	local font = love.graphics.newFont(14)
	love.graphics.setFont(font)

	love.graphics.setColor(255, 255, 255, 255)

	love.graphics.clear()

	local err = {}

	p = string.format("An error has occured that caused %s to stop.\nYou can notify %s about this%s.", love._release.title or "this game", love._release.author or "the author", love._release.url and " at " .. love._release.url or "")

	local function draw()
		love.graphics.clear()
		love.graphics.printf(p, 70, 70, love.graphics.getWidth() - 70)
		love.graphics.present()
	end

	draw()

	local e, a, b, c
	while true do
		e, a, b, c = love.event.wait()

		if e == "quit" then
			return
		end
		if e == "keypressed" and a == "escape" then
			return
		end

		draw()

	end
end

See Also

Other Languages