public static void Unregister(Type t) { try { COMHelper.RegasmUnregisterLocalServer(t); } catch (Exception ex) { Console.WriteLine(ex.Message); // 记录错误 throw ex; // 再次抛出异常 } }
public static void Unregister(Type t) { try { COMHelper.RegasmUnregisterLocalServer(t); } catch (Exception ex) { Console.WriteLine(ex.Message); // Log the error throw ex; // Re-throw the exception } }