BimWorksException
Class in BIM.works_SDK.
API catalogue · BIM.works_SDK · Class
public class BimWorksException : Exception, ISerializableOnly one type of exception is used in the SDK. Further examination of the actual error can be done by reading the enum (GetEnum) Each exception will have a unique code and also a human-readable value (message)
Inheritance and interfaces#
System.ObjectSystem.ExceptionSystem.Runtime.Serialization.ISerializable
Members#
| Member | Kind | Description |
|---|---|---|
| BimWorksException(Enum) | Constructor | |
| BimWorksException(string, Enum) | Constructor | |
| BimWorksException(string, int) | Constructor | |
| GetCode() | Method | |
| GetDomain() | Method | The error domain the server sent (for example "BimWorksErrorCode"), or null for errors raised by the SDK itself |
| GetEnum() | Method | |
| GetErrorType() | Method | The error name the server sent (for example "NODE_NOT_FOUND"). Also set when this SDK version has no enum value for it, in which case GetEnum() is null |
| GetPayload() | Method | The data the server sent with the error, null when it sent none. A RESULT_TOO_LARGE refusal of RunIdsCheck carries the IDS summary here; read it with BIM.wor… |
| GetReference() | Method | The server's name for the failed request: quote it when you report the error, support finds the request with it. Null when the server did not send one (older… |
| GetUserSafeMessage() | Method | The server's message for the user (for example why an IDS is invalid), without the error name. Null when the server sent none |
| ToString() | Method |
BimWorksException(Enum)#
public BimWorksException(Enum enumValue)Parameters#
| Name | Type | Description |
|---|---|---|
enumValue |
System.Enum |
BimWorksException(string, Enum)#
public BimWorksException(string message, Enum enumValue)Parameters#
| Name | Type | Description |
|---|---|---|
message |
System.String |
|
enumValue |
System.Enum |
BimWorksException(string, int)#
public BimWorksException(string message, int code)Parameters#
| Name | Type | Description |
|---|---|---|
message |
System.String |
|
code |
System.Int32 |
GetCode()#
public int GetCode()GetDomain()#
public string GetDomain()The error domain the server sent (for example "BimWorksErrorCode"), or null for errors raised by the SDK itself
GetEnum()#
public Enum GetEnum()GetErrorType()#
public string GetErrorType()The error name the server sent (for example "NODE_NOT_FOUND"). Also set when this SDK version has no enum value for it, in which case GetEnum() is null
GetPayload()#
public JsonElement? GetPayload()The data the server sent with the error, null when it sent none. A RESULT_TOO_LARGE refusal of RunIdsCheck carries the IDS summary here; read it with BIM.works_SDK.Checks.ReadTooLargeSummary(BIM.works_SDK.BimWorksException)
GetReference()#
public string GetReference()The server's name for the failed request: quote it when you report the error, support finds the request with it. Null when the server did not send one (older servers, and errors of the connection itself)
GetUserSafeMessage()#
public string GetUserSafeMessage()The server's message for the user (for example why an IDS is invalid), without the error name. Null when the server sent none
ToString()#
public override string ToString()Inherited members#
System.Exception.GetBaseExceptionSystem.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)System.Exception.GetTypeSystem.Exception.DataSystem.Exception.HelpLinkSystem.Exception.HResultSystem.Exception.InnerExceptionSystem.Exception.MessageSystem.Exception.SourceSystem.Exception.StackTraceSystem.Exception.TargetSiteSystem.Exception.SerializeObjectStateSystem.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.MemberwiseCloneSystem.Object.ReferenceEquals(System.Object,System.Object)