Use ereport() rather than elog(), for "expected" ERRORs.
Use ereport(), with a proper error code, for errors that are "expected" to happen sometimes, like missing configuration files, or network failure. That's nicer in general, but the reason I bumped into this is that internal error messages include a source file name and line number in GPDB, and if those error messages are included in the expected output of regression tests, those tests will fail any time you do change the file, so that the elog() moves around and the line number changes.
Showing
想要评论请 注册 或 登录