From 3aefcf9e4203a02267f2c58f597418b531c1fbb3 Mon Sep 17 00:00:00 2001 From: leogermani Date: Tue, 13 Nov 2018 18:00:11 -0200 Subject: [PATCH] better error message on terms repo --- src/classes/repositories/class-tainacan-terms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/repositories/class-tainacan-terms.php b/src/classes/repositories/class-tainacan-terms.php index 83d6ec175..b3680fd4a 100644 --- a/src/classes/repositories/class-tainacan-terms.php +++ b/src/classes/repositories/class-tainacan-terms.php @@ -160,7 +160,7 @@ class Terms extends Repository { } if ( is_wp_error($term_saved) ) { - throw new \Exception( 'Error adding term: ' . $term_saved->get_error_message() ); + throw new \Exception( 'Error adding term ' . $term->get_name() . ' - ' . $term_saved->get_error_message() ); } // Now run through properties stored as postmeta