private void OnExtensionsLoaded(object sender, RunWorkerCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         ExceptionStatus exceptionStatus = CustomExceptionHandler.ShowExceptionText(e.Error, "LoadExtensionError.Text");
         new frmShowError(exceptionStatus).ShowDialog();
     }
     _InitializeUserRights();
     DisplayFastChoiceForm();
 }
Ejemplo n.º 2
0
        public override string ToString()
        {
            var str = "Result: {0} {1}{2}, {3}".FormatInvariant(
                Success,
                ExceptionStatus.ToString(),
                ErrorMessage.HasValue() ? " ({0})".FormatInvariant(ErrorMessage) : "",
                Path);

            return(str);
        }
Ejemplo n.º 3
0
        // ReSharper disable once StringLiteralTypo
        //[Conditional("DOTNETCORE")]
        public static void HandleException(ExceptionStatus status)
        {
#if DOTNETCORE
            // Check if there has been an exception
            if (status == ExceptionStatus.Occurred /*&& IsUnix()*/) // thrown can be 1 when unix
            {
                ExceptionHandler.ThrowPossibleException();
            }
#endif
        }
Ejemplo n.º 4
0
        public static string GetEnumText(ExceptionStatus en)
        {
            if (en == null)
            {
                return(string.Empty);
            }
            var    field    = en.GetType().GetField(en.ToString());
            string enstring = en.ToString();
            var    attrs    = field.GetCustomAttributes(typeof(TextAttribute), false);

            if (attrs.Length == 1)
            {
                enstring = ((TextAttribute)attrs[0]).value;
            }
            return(enstring);
        }
Ejemplo n.º 5
0
 /* Path: /api/nodes/my/exceptions?key=<apikey>&page=<pageservernumber>&rows=<rowcount>
  * Optional Parameters:  &nid=<nodeid>  return only for specified node.  e.g. &nid=435,  &status=<status>  where <status> is 'o' for open or 'c' for closed.   e.g. &status=o
  * Return: Exceptions for all nodes associated with the API key.
  * Expected return: {"page":1,"total":1,"rowsperpage":"10","records":8,"rows":[{"id":40184,"fqdn":"zen1.secnodes.com","home":"ts1-testnet.na","start":"2018-05-02T17:06:40.000Z","check":"2018-06-13T22:03:22.000Z","end":null,"duration":3646602000,"etype":"chalmax","nid":9}]}
  */
 public static HorizenNodeAPIDataModels.MyExceptions GetMyExceptions(APIKey apikey, int pageservernumber, int rowcount, int?servernumber, int nodeid = 0, string category = null, ExceptionStatus exceptionstatus = ExceptionStatus.NONE, ServerRegion serverregion = ServerRegion.NONE)
 {
     return(JsonConvert.DeserializeObject <HorizenNodeAPIDataModels.MyExceptions>(GetQueryJson(apikey.APINodeType, serverregion, servernumber, APIPagedCallUrlParts.MyExceptions(apikey, pageservernumber, rowcount, nodeid, exceptionstatus, category))));
 }
Ejemplo n.º 6
0
 public frmShowError(ExceptionStatus pExceptionStatus)
 {
     InitializeComponent();
     _expectionStatus = pExceptionStatus;
 }
Ejemplo n.º 7
0
 public FrmShowError(string errorMessage)
 {
     InitializeComponent();
     _exStatus         = new ExceptionStatus();
     _exStatus.message = errorMessage;
 }
Ejemplo n.º 8
0
 public FrmShowError(ExceptionStatus exstatus)
 {
     InitializeComponent();
     _exStatus = exstatus;
 }
Ejemplo n.º 9
0
 public CpuException(Exception origine, String msg, ExceptionStatus stat) : base(origine, msg, stat) { }
Ejemplo n.º 10
0
 public CpuException(String msg, ExceptionStatus stat) : base(msg, stat) { }
Ejemplo n.º 11
0
 public LauncherGenericException(String msg, ExceptionStatus status) : base(msg)
 {
     _Caught = null;
     _Status = status;
 }
 public LauncherGenericException(String msg, ExceptionStatus status) : base(msg){
     _Caught = null;
     _Status = status;
 }
Ejemplo n.º 13
0
 public RamException(String msg, ExceptionStatus stat) : base(msg, stat)
 {
 }
Ejemplo n.º 14
0
 public RamException(Exception origine, String msg, ExceptionStatus stat) : base(origine, msg, stat)
 {
 }
Ejemplo n.º 15
0
        public static string MyExceptions(APIKey apiKey, int pageNumber, int rowCount, int nodeId = 0, ExceptionStatus exceptionStatus = ExceptionStatus.NONE, string category = null)
        {
            var retVal = "/api/nodes/my/exceptions?key=" + apiKey.APIkey + "&page=" + pageNumber + "&rows=" + rowCount + (nodeId > 0 ? "&nid=" + nodeId : "") + (!string.IsNullOrEmpty(category) ? "&cat=" + category : "");

            switch (exceptionStatus)
            {
            case ExceptionStatus.OPEN:
                return(retVal + "&status=o");

            case ExceptionStatus.CLOSED:
                return(retVal + "&status=c");

            case ExceptionStatus.EXCLUDE:
                return(retVal + "&status=x");

            case ExceptionStatus.NONE:
            default:
                return(retVal);
            }
        }