title: .cmd and .bat file converting return code to an error message
body: <p>I'm trying to automate a program I made with a test suite via a .cmd file.</p>
  
  <p>I can get the program that I ran's return code via %errorlevel%. </p>
  
  <p>My program has certain return codes for each type of error.</p>
  
  <p>For example: </p>
  
  <p>1 - means failed for such and such a reason</p>
  
  <p>2 - means failed for some other reason</p>
  
  <p>...</p>
  
  <p>echo FAILED: Test case failed, error level: %errorlevel% >> TestSuite1Log.txt</p>
  
  <p>Instead I'd like to somehow say:</p>
  
  <p>echo FAILED: Test case failed, error reason: lookupError(%errorlevel%) >> TestSuite1Log.txt</p>
  
  <p>Is this possible with a .bat file? Or do I have to move to a scripting language like python/perl?</p>