@@ -114,8 +114,13 @@ class ResultSet {
114114 let prop = props [ i ] ;
115115 var propIndex = prop [ 0 ] ;
116116 let prop_name = this . _graph . getProperty ( propIndex ) ;
117- while ( prop_name == undefined ) {
117+ var x = 0 ;
118+ while ( prop_name == undefined && x < 10 ) {
118119 prop_name = await this . _graph . fetchAndGetProperty ( propIndex ) ;
120+ x ++ ;
121+ }
122+ if ( prop_name == undefined ) {
123+ console . log ( "unable to retrive property name value for propety index " + propIndex ) ;
119124 }
120125 let prop_value = this . parseScalar ( prop . slice ( 1 , prop . length ) ) ;
121126 properties [ prop_name ] = prop_value ;
@@ -130,8 +135,13 @@ class ResultSet {
130135
131136 let node_id = cell [ 0 ] ;
132137 let label = this . _graph . getLabel ( cell [ 1 ] [ 0 ] ) ;
133- while ( label == undefined ) {
138+ var x = 0 ;
139+ while ( label == undefined && x < 10 ) {
134140 label = await this . _graph . fetchAndGetLabel ( cell [ 1 ] [ 0 ] ) ;
141+ x ++ ;
142+ }
143+ if ( label == undefined ) {
144+ console . log ( "unable to retrive label value for label index " + cell [ 1 ] [ 0 ] ) ;
135145 }
136146 let properties = await this . parseEntityProperties ( cell [ 2 ] ) ;
137147 let node = new Node ( label , properties ) ;
@@ -148,8 +158,13 @@ class ResultSet {
148158
149159 let edge_id = cell [ 0 ] ;
150160 let relation = this . _graph . getRelationship ( cell [ 1 ] ) ;
151- while ( relation == undefined ) {
161+ var x = 0 ;
162+ while ( relation == undefined && x < 10 ) {
152163 relation = await this . _graph . fetchAndGetRelationship ( cell [ 1 ] )
164+ x ++ ;
165+ }
166+ if ( relation == undefined ) {
167+ console . log ( "unable to retrive relationship type value for relationship index " + cell [ 1 ] ) ;
153168 }
154169 let src_node_id = cell [ 2 ] ;
155170 let dest_node_id = cell [ 3 ] ;
0 commit comments