Kinetica   C#   API  Version 7.2.3.1
KineticaException.cs
Go to the documentation of this file.
1 using System;
2 
3 
4 namespace kinetica;
5 
6 public class KineticaException : System.Exception
7  {
12  public int? StatusCode { get; }
13 
14  public KineticaException() { }
15 
16  public KineticaException(string msg) : base ( msg ) { }
17 
18  public KineticaException( string msg, Exception innerException ) :
19  base( msg, innerException ) { }
20 
27  public KineticaException(string msg, int? statusCode, Exception? innerException = null)
28  : base(msg, innerException)
29  {
30  StatusCode = statusCode;
31  }
32 
33  public string what() { return Message; }
34 
35  public override string ToString()
36  {
37  var baseMsg = "KineticaException: " + Message;
38  return StatusCode.HasValue ? $"{baseMsg} (HTTP {StatusCode})" : baseMsg;
39  }
40  }
override string ToString()
int? StatusCode
HTTP status code if this exception originated from an HTTP error response.
KineticaException(string msg)
KineticaException(string msg, Exception innerException)
KineticaException(string msg, int? statusCode, Exception? innerException=null)
Creates a KineticaException with an HTTP status code.