Browse Source

Fixed errors caused by love exceptions to give a line number (see issue #772)

Alex Szpakowski 11 years ago
parent
commit
259bb8ffdb

+ 1 - 0
platform/macosx/love-framework.xcodeproj/project.pbxproj

@@ -1411,6 +1411,7 @@
 			);
 			);
 			name = love;
 			name = love;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
+			usesTabs = 1;
 		};
 		};
 		548A533617C45319431D3ECF /* modules */ = {
 		548A533617C45319431D3ECF /* modules */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;

+ 1 - 1
src/common/runtime.h

@@ -486,7 +486,7 @@ Type luax_type(lua_State *L, int idx);
 		lua_pushstring(L, e.what()); \
 		lua_pushstring(L, e.what()); \
 	} \
 	} \
 	if (should_error) \
 	if (should_error) \
-		return lua_error(L); \
+		return luaL_error(L, "%s", lua_tostring(L, -1)); \
 }
 }
 
 
 } // love
 } // love