ソースを参照

Rename love.errhand to love.errorhandler (see issue #573).

love.errhand will still be called if love.errorhandler doesn't exist, and love defines love.errhand by default rather than love.errorhandler, to prevent hard-to-diagnose problems with existing code that defines love.errhand.

--HG--
branch : minor
Alex Szpakowski 8 年 前
コミット
9654376bdd
2 ファイル変更4 行追加3 行削除
  1. 1 1
      src/scripts/boot.lua
  2. 3 2
      src/scripts/boot.lua.h

+ 1 - 1
src/scripts/boot.lua

@@ -716,7 +716,7 @@ function love.errhand(msg)
 end
 
 local function deferErrhand(...)
-	local handler = love.errhand or error_printer
+	local handler = love.errorhandler or love.errhand or error_printer
 	return handler(...)
 end
 

+ 3 - 2
src/scripts/boot.lua.h

@@ -1295,8 +1295,9 @@ const unsigned char boot_lua[] =
 	0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x65, 0x66, 
 	0x65, 0x72, 0x45, 0x72, 0x72, 0x68, 0x61, 0x6e, 0x64, 0x28, 0x2e, 0x2e, 0x2e, 0x29, 0x0a,
 	0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x6c, 
-	0x6f, 0x76, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x68, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x72, 0x72, 
-	0x6f, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x0a,
+	0x6f, 0x76, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x20, 0x6f, 
+	0x72, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x68, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x72, 0x20, 
+	0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x0a,
 	0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x28, 0x2e, 0x2e, 
 	0x2e, 0x29, 0x0a,
 	0x65, 0x6e, 0x64, 0x0a,