@@ -446,8 +446,8 @@ static TInterconnectSettings GetInterconnectSettings(const NKikimrConfig::TInter
446
446
try {
447
447
return TFileInput (*path).ReadAll ();
448
448
} catch (const std::exception & ex) {
449
- Cerr << " failed to read " << name << " file ' " << *path << " ': " << ex. what () << Endl;
450
- exit ( 1 );
449
+ ythrow yexception ()
450
+ << " failed to read " << name << " file ' " << *path << " ': " << ex. what ( );
451
451
}
452
452
}
453
453
return TString ();
@@ -743,9 +743,9 @@ void TBasicServicesInitializer::InitializeServices(NActors::TActorSystemSetup* s
743
743
auto listener = new TInterconnectListenerTCP (
744
744
address, node.second .second , icCommon);
745
745
if (int err = listener->Bind ()) {
746
- Cerr << " Failed to set up IC listener on port " << node. second . second
747
- << " errno# " << err << " ( " << strerror (err) << " ) " << Endl;
748
- exit ( 1 ) ;
746
+ ythrow yexception ()
747
+ << " Failed to set up IC listener on port " << node. second . second
748
+ << " errno# " << err << " ( " << strerror (err) << " ) " ;
749
749
}
750
750
setup->LocalServices .emplace_back (MakeInterconnectListenerActorId (false ), TActorSetupCmd (listener,
751
751
TMailboxType::ReadAsFilled, interconnectPoolId));
@@ -763,9 +763,9 @@ void TBasicServicesInitializer::InitializeServices(NActors::TActorSystemSetup* s
763
763
}
764
764
auto listener = new TInterconnectListenerTCP (address, info.GetPort (), icCommon);
765
765
if (int err = listener->Bind ()) {
766
- Cerr << " Failed to set up IC listener on port " << info. GetPort ()
767
- << " errno# " << err << " ( " << strerror (err) << " ) " << Endl;
768
- exit ( 1 ) ;
766
+ ythrow yexception ()
767
+ << " Failed to set up IC listener on port " << info. GetPort ()
768
+ << " errno# " << err << " ( " << strerror (err) << " ) " ;
769
769
}
770
770
setup->LocalServices .emplace_back (MakeInterconnectListenerActorId (true ), TActorSetupCmd (listener,
771
771
TMailboxType::ReadAsFilled, interconnectPoolId));
@@ -779,9 +779,9 @@ void TBasicServicesInitializer::InitializeServices(NActors::TActorSystemSetup* s
779
779
icCommon->TechnicalSelfHostName = nodesManagerConfig.GetHost ();
780
780
auto listener = new TInterconnectListenerTCP ({}, nodesManagerConfig.GetPort (), icCommon);
781
781
if (int err = listener->Bind ()) {
782
- Cerr << " Failed to set up IC listener on port " << nodesManagerConfig. GetPort ()
783
- << " errno# " << err << " ( " << strerror (err) << " ) " << Endl;
784
- exit ( 1 ) ;
782
+ ythrow yexception ()
783
+ << " Failed to set up IC listener on port " << nodesManagerConfig. GetPort ()
784
+ << " errno# " << err << " ( " << strerror (err) << " ) " ;
785
785
}
786
786
setup->LocalServices .emplace_back (MakeInterconnectListenerActorId (true ), TActorSetupCmd (listener,
787
787
TMailboxType::ReadAsFilled, interconnectPoolId));
0 commit comments