- Timestamp:
- 05/30/13 20:13:08 (12 years ago)
- Location:
- trunk/src
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gl/gl_context.cc
r45 r64 49 49 if ( viewport.z < 0 || viewport.w < 0 ) 50 50 { 51 throw new logic_error("viewport width and height must be greater than zero!");51 NV_THROW( logic_error, "viewport width and height must be greater than zero!"); 52 52 } 53 53 … … 126 126 if ( scissor.dim.x < 0 || scissor.dim.y < 0 ) 127 127 { 128 throw new logic_error("scissor_test.rect width and height must be greater than zero!");128 NV_THROW( logic_error, "scissor_test.rect width and height must be greater than zero!" ); 129 129 } 130 130 … … 174 174 if ( range.near < 0.0 || range.near > 1.0 ) 175 175 { 176 throw new logic_error("render_state.depth_range.near must be between zero and one!");176 NV_THROW( logic_error, "render_state.depth_range.near must be between zero and one!"); 177 177 } 178 178 if ( range.far < 0.0 || range.far > 1.0 ) 179 179 { 180 throw new logic_error("render_state.depth_range.far must be between zero and one!");180 NV_THROW( logic_error, "render_state.depth_range.far must be between zero and one!"); 181 181 } 182 182 -
trunk/src/gl/texture_font.cc
r45 r64 44 44 45 45 error = FT_Init_FreeType( (FT_Library*)(&m_rlibrary) ); 46 if ( error ) throw std::runtime_error("FT_Error" );46 if ( error ) NV_THROW( std::runtime_error, "FT_Error" ); 47 47 48 48 error = FT_New_Face( (FT_Library)(m_rlibrary), filename, 0, (FT_Face*)(&m_rface) ); 49 if ( error ) throw std::runtime_error("FT_Error" );49 if ( error ) NV_THROW( std::runtime_error, "FT_Error" ); 50 50 51 51 error = FT_Set_Char_Size( (FT_Face)(m_rface), (int)(size*64), 0, 72*64, 72 ); 52 if ( error ) throw std::runtime_error("FT_Error" );52 if ( error ) NV_THROW( std::runtime_error, "FT_Error" ); 53 53 54 54 FT_Set_Transform( (FT_Face)(m_rface), &matrix, NULL ); … … 106 106 error_msg << "FT_Error while loading glyphs, error: " 107 107 << error << " code: " << c; 108 throw std::runtime_error(error_msg.str().c_str() );108 NV_THROW( std::runtime_error, error_msg.str().c_str() ); 109 109 } 110 110 … … 124 124 << "r.pos.x: " << r.pos.x << " code: " 125 125 << c; 126 throw std::runtime_error(error_msg.str().c_str() );126 NV_THROW( std::runtime_error, error_msg.str().c_str() ); 127 127 } 128 128 r.size.x -= 1; -
trunk/src/library.cc
r14 r64 75 75 if ( m_handle == NULL ) 76 76 { 77 throw library_error("Can't load library!", name );77 NV_THROW( library_error, "Can't load library!", name ); 78 78 } 79 79 NV_LOG( LOG_NOTICE, "library : '" + name + "' loaded." ); … … 85 85 if ( !result ) 86 86 { 87 throw library_error("Can't find symbol " + symbol + "!", m_name );87 NV_THROW( library_error, "Can't find symbol " + symbol + "!", m_name ); 88 88 } 89 89 return result; -
trunk/src/logger.cc
r48 r64 5 5 #include "nv/logger.hh" 6 6 7 #include "nv/common.hh" 7 8 #include <iostream> 8 9 #include <utility> … … 208 209 { 209 210 // throw if not open 210 throw runtime_error("Could not open file \""+file_name+"\" for logging!" );211 NV_THROW( runtime_error, "Could not open file \""+file_name+"\" for logging!" ); 211 212 } 212 213 -
trunk/src/object.cc
r57 r64 7 7 #include "nv/object.hh" 8 8 9 #include "nv/root.hh" 9 10 #include "nv/types.hh" 10 11 … … 12 13 13 14 object::object() 14 : m_ id(), m_name(), m_uid(0), m_lua_index(-2), m_parent( nullptr ), m_children(), m_child_count(0)15 : m_root( nullptr ), m_id(), m_name(), m_uid(0), m_lua_index(-2), m_parent( nullptr ), m_children(), m_child_count(0) 15 16 { 16 17 // m_uid = uid_store::get_free_uid(); … … 18 19 } 19 20 20 object::object( stringaid, uid auid )21 : m_ id(aid), m_name(), m_uid( auid ), m_lua_index(-2), m_parent( nullptr ), m_children(), m_child_count(0)21 object::object( root* aroot, const string& aid, uid auid ) 22 : m_root( aroot ), m_id(aid), m_name(), m_uid( auid ), m_lua_index(-2), m_parent( nullptr ), m_children(), m_child_count(0) 22 23 { 23 24 // uid_store::register_object( this, auid );
Note: See TracChangeset
for help on using the changeset viewer.