Improve error message on sql function
This commit is contained in:
@@ -15,7 +15,7 @@ begin
|
||||
insert into comment_on_constitution (id, created_by_id, target_id, content, parent_comment_id)
|
||||
values (_new_id, _created_by_id, _target_id, _content, _parent_comment_id);
|
||||
else
|
||||
raise exception 'comment with target as "%", is no implemented', reference::text;
|
||||
raise exception 'comment with target as "%", is not implemented', reference::text;
|
||||
end if;
|
||||
_id = _new_id;
|
||||
end;
|
||||
|
||||
@@ -15,7 +15,7 @@ begin
|
||||
values (_created_by_id, _target_id)
|
||||
on conflict (created_by_id, target_id) do nothing;
|
||||
else
|
||||
raise exception '% no implemented', reference::text;
|
||||
raise exception '% no implemented for follow', reference::text;
|
||||
end if;
|
||||
end;
|
||||
$$;
|
||||
|
||||
@@ -31,7 +31,7 @@ begin
|
||||
anonymous = excluded.anonymous,
|
||||
updated_at = now();
|
||||
else
|
||||
raise exception '% no implemented', reference::text;
|
||||
raise exception '% no implemented for vote', reference::text;
|
||||
end if;
|
||||
|
||||
select count_vote(reference, _target_id) into resource;
|
||||
|
||||
@@ -77,7 +77,7 @@ begin
|
||||
order by version_number desc
|
||||
limit 1;
|
||||
else
|
||||
raise exception '% is not implemented', tablename::text;
|
||||
raise exception '% is not implemented for function "generate_version_number"', tablename::text;
|
||||
end if;
|
||||
|
||||
if not found then
|
||||
@@ -103,7 +103,7 @@ begin
|
||||
where c.version_id = _version_id
|
||||
and c.last_version = true;
|
||||
else
|
||||
raise exception '% is not implemented', tablename::text;
|
||||
raise exception '% is not implemented for function "set_all_version_to_old"', tablename::text;
|
||||
end if;
|
||||
end;
|
||||
$$;
|
||||
@@ -145,7 +145,7 @@ begin
|
||||
where c1.version_id = _version_id
|
||||
and c1.id = c3.id;
|
||||
else
|
||||
raise exception '% is not implemented', tablename::text;
|
||||
raise exception '% is not implemented for function "set_correct_last_version"', tablename::text;
|
||||
end if;
|
||||
end;
|
||||
$$;
|
||||
|
||||
Reference in New Issue
Block a user