public static AppException FileDoesNotExist(FilePath path, [Caller] string caller = null, [File] string file = null, [Line] int?line = null) => AppException.Define(ErrorMessages.FileDoesNotExist(path, caller, file, line));
/// <summary> /// Attempts to parse a text document and returns the result if successful /// </summary> /// <param name="src">The source document path</param> /// <param name="format">The document format</param> /// <param name="observer">An optional observer to witness intersting events</param> public static Option <TextDoc> ParseDocument(this FilePath src, TextFormat?format = null, Action <AppMsg> observer = null) { if (!src.Exists()) { observer?.Invoke(ErrorMessages.FileDoesNotExist(src)); return(default);