pgbackrest.git / summary / log / commit / refs

commit    72ea47bfb341ff78f2582607e27e7b7df2ac25f8
Author:   David Steele <david@pgmasters.net>
Date:     Sun Nov 11 23:07:56 2018 +0000

    Add KernelError to report miscellaneous kernel errors.


build/error.yaml | 3 +++ doc/xml/release.xml | 4 ++++ lib/pgBackRest/Common/ExceptionAuto.pm | 2 ++ src/common/error.auto.c | 2 ++ src/common/error.auto.h | 1 + src/perl/embed.auto.c | 2 ++ 6 files changed, 14 insertions(+) diff --git a/build/error.yaml b/build/error.yaml index dee6d9a3d..8673fdb2a 100644 --- a/build/error.yaml +++ b/build/error.yaml @@ -89,6 +89,9 @@ file-info: 98 # Invalid JSON format. Eventually this should be a child of format error and share the same code json-format: 99 +# An error from the kernel that there's nothing we can do about. It should always be fatal. +kernel: 100 + # This error should not be thrown directly -- it serves as a parent for the C errors runtime: 122 diff --git a/doc/xml/release.xml b/doc/xml/release.xml index d687ce060..3bc43e1ee 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -110,6 +110,10 @@ <p>Add <code>THROW*_ON_SYS_ERROR*</code> macros to test and throw system errors.</p> </release-item> + <release-item> + <p>Add <code>KernelError</code> to report miscellaneous kernel errors.</p> + </release-item> + <release-item> <p><code>Storage</code> interface methods no longer declare the driver as const.</p> </release-item> diff --git a/lib/pgBackRest/Common/ExceptionAuto.pm b/lib/pgBackRest/Common/ExceptionAuto.pm index 8ea5eee51..82c913461 100644 --- a/lib/pgBackRest/Common/ExceptionAuto.pm +++ b/lib/pgBackRest/Common/ExceptionAuto.pm @@ -167,6 +167,8 @@ use constant ERROR_FILE_INFO => 98; push @EXPORT, qw(ERROR_FILE_INFO); use constant ERROR_JSON_FORMAT => 99; push @EXPORT, qw(ERROR_JSON_FORMAT); +use constant ERROR_KERNEL => 100; +push @EXPORT, qw(ERROR_KERNEL); use constant ERROR_RUNTIME => 122; push @EXPORT, qw(ERROR_RUNTIME); use constant ERROR_INVALID => 123; diff --git a/src/common/error.auto.c b/src/common/error.auto.c index 61456ee95..75f7d271f 100644 --- a/src/common/error.auto.c +++ b/src/common/error.auto.c @@ -81,6 +81,7 @@ ERROR_DEFINE( 96, ParamInvalidError, RuntimeError); ERROR_DEFINE( 97, PathCloseError, RuntimeError); ERROR_DEFINE( 98, FileInfoError, RuntimeError); ERROR_DEFINE( 99, JsonFormatError, RuntimeError); +ERROR_DEFINE(100, KernelError, RuntimeError); ERROR_DEFINE(122, RuntimeError, RuntimeError); ERROR_DEFINE(123, InvalidError, RuntimeError); ERROR_DEFINE(124, UnhandledError, RuntimeError); @@ -165,6 +166,7 @@ static const ErrorType *errorTypeList[] = &PathCloseError, &FileInfoError, &JsonFormatError, + &KernelError, &RuntimeError, &InvalidError, &UnhandledError, diff --git a/src/common/error.auto.h b/src/common/error.auto.h index b5354e1ad..b5616dc76 100644 --- a/src/common/error.auto.h +++ b/src/common/error.auto.h @@ -83,6 +83,7 @@ ERROR_DECLARE(ParamInvalidError); ERROR_DECLARE(PathCloseError); ERROR_DECLARE(FileInfoError); ERROR_DECLARE(JsonFormatError); +ERROR_DECLARE(KernelError); ERROR_DECLARE(RuntimeError); ERROR_DECLARE(InvalidError); ERROR_DECLARE(UnhandledError); diff --git a/src/perl/embed.auto.c b/src/perl/embed.auto.c index 2ce93884b..a749f8da9 100644 --- a/src/perl/embed.auto.c +++ b/src/perl/embed.auto.c @@ -5216,6 +5216,8 @@ static const EmbeddedModule embeddedModule[] = "push @EXPORT, qw(ERROR_FILE_INFO);\n" "use constant ERROR_JSON_FORMAT => 99;\n" "push @EXPORT, qw(ERROR_JSON_FORMAT);\n" + "use constant ERROR_KERNEL => 100;\n" + "push @EXPORT, qw(ERROR_KERNEL);\n" "use constant ERROR_RUNTIME => 122;\n" "push @EXPORT, qw(ERROR_RUNTIME);\n" "use constant ERROR_INVALID => 123;\n" [parent: 257df96b12f3]