Index: trunk/nv/interface/program.hh
===================================================================
--- trunk/nv/interface/program.hh	(revision 49)
+++ trunk/nv/interface/program.hh	(revision 50)
@@ -15,4 +15,5 @@
 #include <unordered_map>
 #include <nv/logging.hh>
+#include <nv/exception.hh>
 #include <nv/common.hh>
 #include <nv/string.hh>
@@ -108,8 +109,29 @@
 					i != m_uniform_map.end(); ++i ) delete i->second;
 		}
+		attribute* try_get_attribute( const string& name ) const
+		{
+			attribute_map::const_iterator i = m_attribute_map.find( name );
+			if ( i != m_attribute_map.end() )
+			{
+				return i->second;
+			}
+			return nullptr;
+		}
+
 		attribute* get_attribute( const string& name ) const
 		{
 			attribute_map::const_iterator i = m_attribute_map.find( name );
 			if ( i != m_attribute_map.end() )
+			{
+				return i->second;
+			}
+			NV_LOG( LOG_ERROR, "Attribute '" << name << "' not found in program!" );
+			throw runtime_error( "Attribute '"+name+"' not found!" );
+		}
+
+		uniform_base* try_get_uniform( const string& name ) const
+		{
+			uniform_map::const_iterator i = m_uniform_map.find( name );
+			if ( i != m_uniform_map.end() )
 			{
 				return i->second;
@@ -125,5 +147,6 @@
 				return i->second;
 			}
-			return nullptr;
+			NV_LOG( LOG_ERROR, "Uniform '" << name << "' not found in program!" );
+			throw runtime_error( "Uniform '"+name+"' not found!" );
 		}
 
@@ -133,9 +156,9 @@
 			uniform_base* base = get_uniform( name );
 			// restore typechecking, but remember to accept int for float!
-			if ( base == nullptr /* || base->get_type() != type_to_enum<T>::type */ )
-			{
-				NV_LOG( LOG_ERROR, "Uniform '" << name << "' not found in program!" );
-				return;
-			}
+			// if ( /* base->get_type() != type_to_enum<T>::type */ )
+			// {
+			//		NV_LOG( LOG_ERROR, "Uniform '" << name << "' not found in program!" );
+			//		return;
+			// }
 			((uniform<T>*)( base ))->set_value( value );
 		}
Index: trunk/tests/render_test/rl.cc
===================================================================
--- trunk/tests/render_test/rl.cc	(revision 49)
+++ trunk/tests/render_test/rl.cc	(revision 50)
@@ -186,12 +186,8 @@
 	va = m_device->create_vertex_array();
 
-	nv::attribute* a;
-	a = p->get_attribute( "coords" ); if (a == nullptr) return false;
 	nv::vertex_buffer* vbcoords   = m_device->create_vertex_buffer( nv::STATIC_DRAW, count*sizeof(byte3), vertex );
-	va->add_vertex_buffer( a->get_location(), vbcoords, nv::BYTE, 3 );
-
-	a = p->get_attribute( "material" ); if (a == nullptr) return false;
+	va->add_vertex_buffer( p->get_attribute( "coords" )->get_location(), vbcoords, nv::BYTE, 3 );
 	nv::vertex_buffer* vbmaterial = m_device->create_vertex_buffer( nv::STATIC_DRAW, count*sizeof(byte3), material );
-	va->add_vertex_buffer( a->get_location(), vbmaterial, nv::BYTE, 3 );
+	va->add_vertex_buffer( p->get_attribute( "material" )->get_location(), vbmaterial, nv::BYTE, 3 );
 
 	return true;
