Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 11, 2015, 10:56:26 AM (9 years ago)
Author:
muemart
Message:

Various fixes and improvements in the Loader (and LuaState)

  • When there's lua code in the xml, the error message now says where exactly the error is coming from (file and line)
  • When there's an error in the loader when reading xml, the full xml file gets dumped to the temporary directory for inspection
  • Fix and simplify detection of lua tags
  • Make sure the reported line in an xml parsing error is useful
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/LuaState.h

    r8858 r10264  
    9494        void clearOutput() { output_.clear(); } // tolua_export
    9595
     96        void setTraceMap(shared_ptr<std::vector<std::vector<std::pair<std::string, size_t>>>> map)
     97            { map->push_back(std::vector<std::pair<std::string, size_t>>()); lineTrace_ = map; }
     98
    9699        void setIncludeParser(std::string (*function)(const std::string&)) { includeParseFunction_ = function; }
    97100        lua_State* getInternalLuaState() { return luaState_; }
     
    113116    private:
    114117        shared_ptr<ResourceInfo> getFileInfo(const std::string& filename);
    115 
     118        shared_ptr<std::vector<std::vector<std::pair<std::string, size_t>>>> lineTrace_;
     119       
    116120        std::stringstream output_;
    117121        lua_State* luaState_;
Note: See TracChangeset for help on using the changeset viewer.