| @@ -157,11 +157,15 @@ | ||
| 157 | 157 | delete_option( 'betterdocs_helpscout_total_pages' ); |
| 158 | 158 | } |
| 159 | 159 | } |
| 160 | 160 | } catch ( \WP_Error $wp_error ) { |
| 161 | - return false; | |
| 161 | + // Handle WP_Error exceptions | |
| 162 | + //error_log('WP_Error occurred during migration: ' . $wp_error->get_error_message()); | |
| 163 | + return false; // Indicate failure to process the current item | |
| 162 | 164 | } catch ( \Exception $e ) { |
| 163 | - return false; | |
| 165 | + // Handle other exceptions | |
| 166 | + //error_log('Error occurred during migration: ' . $e->getMessage()); | |
| 167 | + return false; // Indicate failure to process the current item | |
| 164 | 168 | } |
| 165 | 169 | |
| 166 | 170 | return true; // Indicate success |
| 167 | 171 | } |