From 2774221ab7cec37a97db2c5ef5fb33db48c4aebd Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 2 Jun 2014 15:12:28 +0800 Subject: [PATCH] return error --- src/node.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/node.c b/src/node.c index 31ef3c8..16adc0c 100644 --- a/src/node.c +++ b/src/node.c @@ -574,7 +574,9 @@ node * r3_tree_insert_pathl_ex(node *tree, const char *path, int path_len, route char *err = NULL; int slug_cnt = slug_count(path, path_len, &err); if (err) { - fprintf(stderr, "Can not insert path '%s'. Error: %s\n", path, err); + if(errstr) { + *errstr = err; + } free(err); return NULL; }