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(); }
public override string ToString() { var str = "Result: {0} {1}{2}, {3}".FormatInvariant( Success, ExceptionStatus.ToString(), ErrorMessage.HasValue() ? " ({0})".FormatInvariant(ErrorMessage) : "", Path); return(str); }
// 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 }
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); }
/* 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)))); }
public frmShowError(ExceptionStatus pExceptionStatus) { InitializeComponent(); _expectionStatus = pExceptionStatus; }
public FrmShowError(string errorMessage) { InitializeComponent(); _exStatus = new ExceptionStatus(); _exStatus.message = errorMessage; }
public FrmShowError(ExceptionStatus exstatus) { InitializeComponent(); _exStatus = exstatus; }
public CpuException(Exception origine, String msg, ExceptionStatus stat) : base(origine, msg, stat) { }
public CpuException(String msg, ExceptionStatus stat) : base(msg, stat) { }
public LauncherGenericException(String msg, ExceptionStatus status) : base(msg) { _Caught = null; _Status = status; }
public LauncherGenericException(String msg, ExceptionStatus status) : base(msg){ _Caught = null; _Status = status; }
public RamException(String msg, ExceptionStatus stat) : base(msg, stat) { }
public RamException(Exception origine, String msg, ExceptionStatus stat) : base(origine, msg, stat) { }
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); } }