< Summary

Class:SharpHoundRPC.RPCException
Assembly:SharpHoundRPC
File(s):D:\a\SharpHoundCommon\SharpHoundCommon\src\SharpHoundRPC\RPCException.cs
Covered lines:0
Uncovered lines:13
Coverable lines:13
Total lines:39
Line coverage:0% (0 of 13)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%100%
.ctor(...)100%100%
ToString()100%100%

File(s)

D:\a\SharpHoundCommon\SharpHoundCommon\src\SharpHoundRPC\RPCException.cs

#LineLine coverage
 1using System;
 2
 3namespace SharpHoundRPC
 4{
 5    public class RPCException : Exception
 6    {
 7        public const string Connect = "SamConnect";
 8        public const string EnumerateDomains = "SamEnumerateDomainsInSamServer";
 9        public const string ServerNotInitialized = "Server Not Initialized";
 10        public const string OpenAlias = "SamOpenAlias";
 11        public const string OpenDomain = "SamOpenDomain";
 12        public const string AliasNotFound = "Alias Not Found";
 13        public const string DomainNotFound = "Domain Not Found";
 14        public const string LookupIds = "SamLookupIdsInDomain";
 15        public const string EnumerateAliases = "SamEnumerateAliasesInDomain";
 16        public const string GetAliasMembers = "SamGetMembersinAlias";
 17        public const string LookupDomain = "SamLookupDomainInSamServer";
 18        public const string GetMachineSid = "GetMachineSid";
 19        private readonly string APICall;
 20        private readonly string Status;
 21
 022        public RPCException(string apiCall, NtStatus status)
 023        {
 024            APICall = apiCall;
 025            Status = status.ToString();
 026        }
 27
 028        public RPCException(string apiCall, string status)
 029        {
 030            APICall = apiCall;
 031            Status = status;
 032        }
 33
 34        public override string ToString()
 035        {
 036            return $"Call to {APICall} returned {Status}";
 037        }
 38    }
 39}