File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,13 @@ process(
68
68
return ;
69
69
}
70
70
71
+ /* checks previously done on sql now done here */
72
+ if (strcmp (fn_suffix , "DD" ) == 0 && distance < 0 ) {
73
+ throw_error ("Negative value found on 'distance'" , "Must be positive" );
74
+ } else if ((strcmp (fn_suffix , "BFS" ) == 0 || strcmp (fn_suffix , "DFS" ) == 0 ) && max_depth < 0 ) {
75
+ throw_error ("Negative value found on 'max_depth'" , "Must be positive" );
76
+ }
77
+
71
78
clock_t start_t = clock ();
72
79
pgr_do_kruskal (
73
80
edges_sql ,
Original file line number Diff line number Diff line change @@ -63,6 +63,12 @@ process(
63
63
return ;
64
64
}
65
65
66
+ if (strcmp (fn_suffix , "DD" ) == 0 && distance < 0 ) {
67
+ throw_error ("Negative value found on 'distance'" , "Must be positive" );
68
+ } else if ((strcmp (fn_suffix , "BFS" ) == 0 || strcmp (fn_suffix , "DFS" ) == 0 ) && max_depth < 0 ) {
69
+ throw_error ("Negative value found on 'max_depth'" , "Must be positive" );
70
+ }
71
+
66
72
clock_t start_t = clock ();
67
73
pgr_do_prim (
68
74
edges_sql ,
You can’t perform that action at this time.
0 commit comments