|
1 | 1 | #include <stdio.h> |
| 2 | +#include "../include/common/error.h" |
2 | 3 | #include "../include/index/label.h" |
3 | 4 | #include "../include/index/order.h" |
4 | 5 | #include "../include/partition/partition.h" |
|
16 | 17 | #include "../include/topology/structure.h" |
17 | 18 | #include "../include/topology/vertexlist.h" |
18 | 19 |
|
19 | | -extern __thread GRIN_ERROR_CODE grin_error_code; |
20 | | - |
21 | 20 | GRIN_GRAPH get_graph(int argc, char** argv) { |
22 | 21 | #ifdef GRIN_ENABLE_GRAPH_PARTITION |
23 | 22 | GRIN_PARTITIONED_GRAPH pg = |
@@ -450,10 +449,10 @@ void test_property_vertex_table(int argc, char** argv) { |
450 | 449 | GRIN_DATATYPE dt = grin_get_vertex_property_data_type(g, vp); |
451 | 450 | const void* pv = |
452 | 451 | grin_get_value_from_vertex_property_table(g, vpt, v, vp); |
453 | | - if (grin_error_code == GRIN_NO_ERROR) { |
| 452 | + if (grin_get_last_error_code() == GRIN_NO_ERROR) { |
454 | 453 | printf("(Correct) no error\n"); |
455 | 454 | } else { |
456 | | - printf("(Wrong) error code: %d\n", grin_error_code); |
| 455 | + printf("(Wrong) error code: %d\n", grin_get_last_error_code()); |
457 | 456 | } |
458 | 457 | const void* rv = grin_get_value_from_row(g, row, dt, j); |
459 | 458 | if (dt == Int64) { |
@@ -803,10 +802,10 @@ void test_error_code(int argc, char** argv) { |
803 | 802 | GRIN_VERTEX v = get_one_vertex(g); |
804 | 803 |
|
805 | 804 | const void* value = grin_get_value_from_vertex_property_table(g, vpt, v, vp); |
806 | | - if (grin_error_code == GRIN_INVALID_VALUE) { |
| 805 | + if (grin_get_last_error_code() == GRIN_INVALID_VALUE) { |
807 | 806 | printf("(Correct) invalid value\n"); |
808 | 807 | } else { |
809 | | - printf("(Wrong) error code: %d\n", grin_error_code); |
| 808 | + printf("(Wrong) error code: %d\n", grin_get_last_error_code()); |
810 | 809 | } |
811 | 810 | } |
812 | 811 |
|
|
0 commit comments