/* ====================================================================
 * Copyright (c) 2003-2006, Martin Hauner
 *                          http://subcommander.tigris.org
 *
 * Subcommander is licensed as described in the file doc/COPYING, which
 * you should have received as part of this distribution.
 * ====================================================================
 */


// sc
#include "ErrorCodes.h"

#define SC_ERROR_BUILD_TABLE
#include "ErrorCodes.h"


namespace sc
{

String strError( ErrorCode code )
{
  for( int i = 0; errors[i]._msg != 0; i++ )
  {
    if( errors[i]._code == code )
    {
      return _s(errors[i]._msg);
    }
  }

  return errors[ErrUnknown]._msg;
}

} // namespace


syntax highlighted by Code2HTML, v. 0.9.1