From 7146ed3065796e3f719745d7169b77340f26dc37 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Tue, 26 Aug 2014 16:36:01 +0300 Subject: VS Profiling: Shutdown the profiler on error. --- MCServer/profile_run.cmd | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MCServer/profile_run.cmd b/MCServer/profile_run.cmd index 58efea64a..1ed47ac11 100644 --- a/MCServer/profile_run.cmd +++ b/MCServer/profile_run.cmd @@ -45,7 +45,7 @@ if %outputdir%n == n ( -::Create the output directory, if it didn't exist +:: Create the output directory, if it didn't exist mkdir %outputdir% @@ -60,7 +60,7 @@ if errorlevel 1 goto haderror :: Launch the application via the profiler %pt%\vsperfcmd /launch:%app% -if errorlevel 1 goto haderror +if errorlevel 1 goto haderrorshutdown :: Shut down the profiler (this command waits, until the application is terminated) %pt%\vsperfcmd /shutdown @@ -86,6 +86,10 @@ goto finished +:haderrorshutdown +echo An error was encountered, shutting down the profiler +%pt%\vsperfcmd /shutdown + :haderror echo An error was encountered pause -- cgit v1.2.3