ChessSharp.Web.Controllers.ChessApiController.NewMoveFailureException C# (CSharp) Method

NewMoveFailureException() private method

private NewMoveFailureException ( Move move, Exception ex ) : Exception
move Chess.Data.Entities.Move
ex System.Exception
return System.Exception
        private Exception NewMoveFailureException(Move move, Exception ex)
        {
            var start = move.StartColumn + ", " + move.StartRow;
            var end = move.EndColumn + ", " + move.EndRow;

            var reasonForFailure = ex.Message;

            return new ArgumentException(String.Format("Moving {0} to {1} is illegal. {2}",
                start, end, reasonForFailure));
        }