/// <summary> /// Writes the exception message(s) on the commandline. /// </summary> /// <param name="ex">Exception.</param> /// <param name="inner">True if messages from innerexceptions also need to be written on the commandline.</param> public static void WriteToCommandLine(this Exception ex, bool inner) { StartException(); Active.WriteMessage(ex.Message); if (inner) { Active.WriteMessage(GetInnerExceptions(ex)); } EndException(); }
/// <summary> /// Retreive the value of an AutoCAD Variable /// </summary> /// <param name="name"></param> /// <returns></returns> public static string GetVariable(string name) { try { object value = Application.GetSystemVariable(name); if (value != null) { return(value.ToString()); } } catch (Exception ex) { Active.WriteMessage(ex.Message); throw; } return(string.Empty); }
private static void EndException() { Active.WriteMessage(END_EXCEPTION); }
private static void StartException() { Active.WriteMessage(START_EXCEPTION); }