Index: trunk/src/lua/lua_state.cc
===================================================================
--- trunk/src/lua/lua_state.cc	(revision 399)
+++ trunk/src/lua/lua_state.cc	(revision 403)
@@ -15,4 +15,9 @@
 
 // stack_guard
+
+#define NV_LUA_ABORT( func, ... ) \
+	NV_LOG_CRITICAL( "lua::" func " : ", __VA_ARGS__ ) \
+	NV_ABORT( "lua::" func " : critical error!" )
+
 
 lua::stack_guard::stack_guard( lua::state* aL )
@@ -424,5 +429,5 @@
 	if ( lua_isnil( m_state, -1 ) )
 	{
-		NV_THROW( runtime_error, lua_name.to_string() + " type not registered!" );
+		NV_LUA_ABORT( "state::register_object", lua_name, " type not registered!" );
 	}
 	deep_pointer_copy( -1, o );
@@ -436,10 +441,10 @@
 	if ( lua_isnil( m_state, -1 ) )
 	{
-		NV_THROW( runtime_error, storage.to_string() + " storage not registered!" );
+		NV_LUA_ABORT( "state::register_proto", "\"", storage, "\" storage not registered!" );
 	}
 	lua_getfield( m_state, -1, id.data() );
 	if ( lua_isnil( m_state, -1 ) )
 	{
-		NV_THROW( runtime_error, id.to_string() + " not found in " + storage.to_string() + " storage!" );
+		NV_LUA_ABORT( "state::register_proto", "\"", id, "\" not found in \"", storage, "\"!" );
 	}
 	return lua::ref( luaL_ref( m_state, LUA_REGISTRYINDEX ) );
@@ -452,5 +457,5 @@
 	if ( lua_isnil( m_state, -1 ) )
 	{
-		NV_THROW( runtime_error, lua_name.to_string() + " type not registered!" );
+		NV_LUA_ABORT( "state::register_native_object_method", "\"", lua_name, "\" type not registered!" );
 	}
 	lua_pushcfunction( m_state, f );
@@ -502,5 +507,5 @@
 	if ( has_functions || has_metatable )
 	{
-		lua_pushstring( m_state, "__ptr" );
+		lua_pushliteral( m_state, "__ptr" );
 		lua_pushlightuserdata( m_state, obj );
 		lua_rawset( m_state, -3 );
@@ -569,5 +574,5 @@
 	if ( lua_isnil( m_state, -1 ) )
 	{
-		NV_THROW( runtime_error, name.to_string() + " type not registered!" );
+		NV_LUA_ABORT( "state::register_singleton", "\"", name, "\" type not registered!" );
 	}
 	deep_pointer_copy( -1, o );
