diff --git a/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Api.pm b/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Api.pm index 3f15ed18..09926287 100644 --- a/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Api.pm +++ b/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Api.pm @@ -227,7 +227,11 @@ sub _invoke_api { eval { $context->{db}->db_rollback(1); }; - die($err) if !$skip_errors; + if ($skip_errors) { + _warn($context,"($context->{rownum}) " . 'database error with subscriber ' . $context->{cli} . ': ' . $err); + } else { + _error($context,"($context->{rownum}) " . 'database error with subscriber ' . $context->{cli} . ': ' . $err); + } } } diff --git a/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Lnp.pm b/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Lnp.pm index b2fc5353..cd4bf88e 100644 --- a/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Lnp.pm +++ b/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Lnp.pm @@ -77,7 +77,11 @@ sub create_lnps { eval { $context->{db}->db_rollback(1); }; - die($err) if !$skip_errors; + if ($skip_errors) { + _warn($context,"($context->{rownum}) " . 'database error with lnp ' . $context->{number} . ': ' . $err); + } else { + _error($context,"($context->{rownum}) " . 'database error with lnp ' . $context->{number} . ': ' . $err); + } } } else { foreach my $imported_lnp (@$records) { @@ -97,7 +101,11 @@ sub create_lnps { eval { $context->{db}->db_rollback(1); }; - die($err) if !$skip_errors; + if ($skip_errors) { + _warn($context,"($context->{rownum}) " . 'database error with lnp ' . $context->{number} . ': ' . $err); + } else { + _error($context,"($context->{rownum}) " . 'database error with lnp ' . $context->{number} . ': ' . $err); + } } } } diff --git a/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Preferences.pm b/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Preferences.pm index 7c88d5e9..d3e3c297 100644 --- a/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Preferences.pm +++ b/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Preferences.pm @@ -254,7 +254,11 @@ sub _set_subscriber_preference { eval { $context->{db}->db_rollback(1); }; - die($err) if !$skip_errors; + if ($skip_errors) { + _warn($context,"($context->{rownum}) " . 'database error with subscriber ' . $context->{cli} . ': ' . $err); + } else { + _error($context,"($context->{rownum}) " . 'database error with subscriber ' . $context->{cli} . ': ' . $err); + } } } @@ -763,7 +767,11 @@ sub cleanup_aig_sequence_ids { eval { $context->{db}->db_rollback(1); }; - die($err) if !$skip_errors; + if ($skip_errors) { + _warn($context,"database problem with voip_aig_sequence clean up: " . $err); + } else { + _error($context,"database problem with voip_aig_sequence clean up: " . $err); + } } } diff --git a/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Provisioning.pm b/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Provisioning.pm index ab835c49..31f4db05 100644 --- a/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Provisioning.pm +++ b/lib/NGCP/BulkProcessor/Projects/Migration/IPGallery/Provisioning.pm @@ -302,7 +302,11 @@ sub _provision_susbcriber { eval { $context->{db}->db_rollback(1); }; - die($err) if !$skip_errors; + if ($skip_errors) { + _warn($context,"($context->{rownum}) " . 'database error with subscriber ' . $context->{cli} . ': ' . $err); + } else { + _error($context,"($context->{rownum}) " . 'database error with subscriber ' . $context->{cli} . ': ' . $err); + } } return 1;