[Bps-public-commit] dbix-searchbuilder branch, set-undef-fix, updated. 1.63-12-g3ed462f

Thomas Sibley trs at bestpractical.com
Wed Apr 10 20:59:02 EDT 2013


The branch, set-undef-fix has been updated
       via  3ed462f07049e81c16cd445f7ac7756a8c75a36f (commit)
      from  8d9d0cb3c0626f074ea3d3c4d2f58c5ca1b4173a (commit)

Summary of changes:
 lib/DBIx/SearchBuilder/Record.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 3ed462f07049e81c16cd445f7ac7756a8c75a36f
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Apr 10 17:38:16 2013 -0700

    A more descriptive error message when trying to null a non-nullable field

diff --git a/lib/DBIx/SearchBuilder/Record.pm b/lib/DBIx/SearchBuilder/Record.pm
index 107cdac..725b81e 100755
--- a/lib/DBIx/SearchBuilder/Record.pm
+++ b/lib/DBIx/SearchBuilder/Record.pm
@@ -800,11 +800,11 @@ sub __Set {
                 $args{'Value'} = $default;
             }
             else {
-                $ret->as_array( 0, 'Illegal value for ' . $args{'Column'} );
+                $ret->as_array( 0, 'Illegal value for non-nullable field ' . $args{'Column'} . ": undef/null value provided and no default specified by class" );
                 $ret->as_error(
                     errno        => 3,
                     do_backtrace => 0,
-                    message      => "Illegal value for " . $args{'Column'}
+                    message      => "Illegal value for non-nullable field " . $args{'Column'} . ": undef/null value provided and no default specified by class"
                 );
                 return ( $ret->return_value );
             }

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list