feat: something
This commit is contained in:
@@ -884,12 +884,9 @@ template_render(MemoryContext context, TemplateNode *node, Datum jsonb_context,
|
|||||||
|
|
||||||
elog(DEBUG1, "Starting template rendering");
|
elog(DEBUG1, "Starting template rendering");
|
||||||
|
|
||||||
/* Use PG_TRY/PG_CATCH to handle errors during the entire rendering process */
|
|
||||||
PG_TRY();
|
PG_TRY();
|
||||||
{
|
{
|
||||||
while (current)
|
while (current)
|
||||||
{
|
|
||||||
PG_TRY();
|
|
||||||
{
|
{
|
||||||
switch (current->type)
|
switch (current->type)
|
||||||
{
|
{
|
||||||
@@ -1379,14 +1376,6 @@ template_render(MemoryContext context, TemplateNode *node, Datum jsonb_context,
|
|||||||
elog(WARNING, "N*UNKN: Unknown node type: %d", current->type);
|
elog(WARNING, "N*UNKN: Unknown node type: %d", current->type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
PG_CATCH();
|
|
||||||
{
|
|
||||||
elog(WARNING, "Error processing template node of type %d", current->type);
|
|
||||||
FlushErrorState();
|
|
||||||
/* Continue with next node */
|
|
||||||
}
|
|
||||||
PG_END_TRY();
|
|
||||||
|
|
||||||
if (*error)
|
if (*error)
|
||||||
break;
|
break;
|
||||||
@@ -2280,4 +2269,3 @@ get_jsonb_value_by_path(Jsonb *jb, const char *path, bool *found)
|
|||||||
pfree(path_copy);
|
pfree(path_copy);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user