@@ -44,12 +44,9 @@ namespace hdt {
4444#define CHECK_BITMAPTRIPLES_INITIALIZED if (bitmapY==NULL || bitmapZ==NULL ){ throw std::runtime_error (" Accessing uninitialized BitmapTriples" ); }
4545
4646BitmapTriples::BitmapTriples () : order(SPO) {
47- string typey=" " ;
48- string typez=" " ;
49- try {
50- typey = spec.get (" stream.y" );
51- typez = spec.get (" stream.z" );
52- }catch (std::exception& e){}
47+ string typey=spec.getOrEmpty (" stream.y" );
48+ string typez=spec.getOrEmpty (" stream.z" );
49+
5350 arrayY = IntSequence::getArray (typey);
5451 arrayZ = IntSequence::getArray (typez);
5552 arrayIndex = NULL ;
@@ -61,20 +58,14 @@ BitmapTriples::BitmapTriples() : order(SPO) {
6158}
6259
6360BitmapTriples::BitmapTriples (HDTSpecification &specification) : spec(specification) {
64- std::string orderStr = " " ;
65- try {
66- orderStr = spec.get (" triplesOrder" );
67- }catch (std::exception& e){}
61+ std::string orderStr = spec.getOrEmpty (" triplesOrder" );
6862
6963 order= parseOrder (orderStr.c_str ());
7064 if (order==Unknown)
7165 order = SPO;
72- string typey=" " ;
73- string typez=" " ;
74- try {
75- typey = spec.get (" stream.y" );
76- typez = spec.get (" stream.z" );
77- }catch (std::exception& e){}
66+ string typey= spec.getOrEmpty (" stream.y" );
67+ string typez= spec.getOrEmpty (" stream.z" );
68+
7869 arrayY = IntSequence::getArray (typey);
7970 arrayZ = IntSequence::getArray (typez);
8071 arrayIndex = NULL ;
@@ -852,11 +843,7 @@ size_t BitmapTriples::loadIndex(unsigned char *ptr, unsigned char *ptrMax, Progr
852843 }
853844
854845 size_t numTriples = controlInformation.getUint (" numTriples" );
855- std::string typeIndex =" " ;
856- try {
857- typeIndex = controlInformation.get (" stream.index" );
858- }
859- catch (exception &e){}
846+ std::string typeIndex = spec.getOrEmpty (" stream.index" );
860847
861848 if (this ->getNumberOfElements ()!=numTriples) {
862849 // FIXME: Force index regeneration instead of error.
0 commit comments