better error message on terms repo

This commit is contained in:
leogermani 2018-11-13 18:00:11 -02:00
parent 0672a0b883
commit 3aefcf9e42
1 changed files with 1 additions and 1 deletions

View File

@ -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