public static void AssertPathValid(String path) { if (!IsPathValid(path)) { throw new Exception("无效路径"); } }