-
Notifications
You must be signed in to change notification settings - Fork 368
/
ExecuteReplyError.cs
34 lines (27 loc) · 1.2 KB
/
ExecuteReplyError.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
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Microsoft.DotNet.Interactive.Jupyter.Protocol
{
[JupyterMessageType(JupyterMessageContentTypes.ExecuteReply)]
public class ExecuteReplyError : ExecuteReply
{
[JsonConstructor]
public ExecuteReplyError(string eName, string eValue, int executionCount = 0,IReadOnlyList<string> traceback = null) : base(StatusValues.Error, executionCount: executionCount)
{
Traceback = traceback ?? new List<string>();
EName = eName;
EValue = eValue;
}
public ExecuteReplyError(Error error,int executionCount = 0, IReadOnlyList<string> traceback = null) : this(error.EName, error.EValue, executionCount, traceback)
{
}
[JsonPropertyName("ename")]
public string EName { get; }
[JsonPropertyName("evalue")]
public string EValue { get; }
[JsonPropertyName("traceback")]
public IReadOnlyList<string> Traceback { get;}
}
}