File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ namespace PAL_NS_BEGIN {
126126
127127 if (!pathExists || containsParentDirectory)
128128 {
129- std::cerr << " Invalid trace folder path." << std::endl ;
129+ throw std::runtime_error ( " Invalid trace folder path." ) ;
130130 return false ;
131131 }
132132
Original file line number Diff line number Diff line change @@ -193,12 +193,12 @@ TEST_F(LogInitTest, LogInitValidPath)
193193
194194TEST_F (LogInitTest, LogInitParentDirectoryInvalidPath)
195195{
196- EXPECT_FALSE (PAL::detail::log_init (true , " invalid/../path/" ));
196+ EXPECT_THROW (PAL::detail::log_init (true , " invalid/../path/" ), std::runtime_error );
197197}
198198
199199TEST_F (LogInitTest, LogInitPathDoesNotExist)
200200{
201- EXPECT_FALSE (PAL::detail::log_init (true , " nonexistent/path/" ));
201+ EXPECT_THROW (PAL::detail::log_init (true , " nonexistent/path/" ), std::runtime_error );
202202}
203203
204204TEST_F (LogInitTest, LogInitAlreadyInitialized)
You can’t perform that action at this time.
0 commit comments