From d2b7cfe47694cef008949255426cc57ab9a8e18a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 1 Dec 2010 14:36:39 +0200 Subject: Implement not_null pointer pragma New exception: null_pointer. --- odb/exceptions.cxx | 6 ++++++ odb/exceptions.hxx | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/odb/exceptions.cxx b/odb/exceptions.cxx index a41f719..e6b4e15 100644 --- a/odb/exceptions.cxx +++ b/odb/exceptions.cxx @@ -7,6 +7,12 @@ namespace odb { + const char* null_pointer:: + what () const throw () + { + return "NULL pointer"; + } + const char* already_in_transaction:: what () const throw () { diff --git a/odb/exceptions.hxx b/odb/exceptions.hxx index 26550cb..eaf8ec8 100644 --- a/odb/exceptions.hxx +++ b/odb/exceptions.hxx @@ -14,6 +14,12 @@ namespace odb { + struct LIBODB_EXPORT null_pointer: odb::exception + { + virtual const char* + what () const throw (); + }; + // Transaction exceptions. // struct LIBODB_EXPORT already_in_transaction: odb::exception -- cgit v1.1