-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathGitErrorException.cs
41 lines (35 loc) · 1.19 KB
/
GitErrorException.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//-----------------------------------------------------------------------
// <copyright file="GitErrorException.cs" company="(none)">
// Copyright © 2013 John Gietzen and the WebGit .NET Authors. All rights reserved.
// </copyright>
// <author>John Gietzen</author>
//-----------------------------------------------------------------------
namespace WebGitNet
{
using System;
public class GitErrorException : Exception
{
private readonly string command;
private readonly string errorOutput;
private readonly int exitCode;
public GitErrorException(string command, string workingDir, int exitCode, string errorOutput)
: base("Fatal error executing git command in '" + workingDir + "'." + Environment.NewLine + errorOutput)
{
this.command = command;
this.exitCode = exitCode;
this.errorOutput = errorOutput;
}
public string Command
{
get { return this.command; }
}
public string ErrorOutput
{
get { return this.errorOutput; }
}
public int ExitCode
{
get { return this.exitCode; }
}
}
}