[valadoc] error/warning message improvements
- From: Florian Brosch <flobrosch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [valadoc] error/warning message improvements
- Date: Mon, 6 Aug 2012 21:20:45 +0000 (UTC)
commit d58b4ea47102809453bc8e10298532de1bf29e00
Author: Florian Brosch <flo brosch gmail com>
Date: Mon Aug 6 02:09:15 2012 +0200
error/warning message improvements
src/doclets/gtkdoc/commentconverter.vala | 6 ++--
src/doclets/gtkdoc/dbus.vala | 2 +-
src/doclets/gtkdoc/doclet.vala | 28 ++++++++++----------
src/doclets/gtkdoc/gcomment.vala | 2 +-
src/doclets/gtkdoc/generator.vala | 4 +-
src/doclets/gtkdoc/utils.vala | 2 +-
src/libvaladoc/api/tree.vala | 2 +-
src/libvaladoc/content/embedded.vala | 3 +-
src/libvaladoc/content/sourcecode.vala | 17 +++++++-----
src/libvaladoc/content/wikilink.vala | 3 +-
src/libvaladoc/documentation/girmetadata.vala | 10 +++---
src/libvaladoc/documentation/wiki.vala | 4 +-
.../importer/valadocdocumentationimporter.vala | 4 +-
src/libvaladoc/markupreader.vala | 6 ++--
src/libvaladoc/moduleloader.vala | 6 ++--
src/valadoc/valadoc.vala | 22 ++++++++--------
16 files changed, 63 insertions(+), 58 deletions(-)
---
diff --git a/src/doclets/gtkdoc/commentconverter.vala b/src/doclets/gtkdoc/commentconverter.vala
index e10b8aa..9582f4d 100644
--- a/src/doclets/gtkdoc/commentconverter.vala
+++ b/src/doclets/gtkdoc/commentconverter.vala
@@ -77,7 +77,7 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
public override void visit_headline (Headline hl) {
// what to do here?
- reporter.simple_warning ("GtkDoc: Headline elements not supported");
+ reporter.simple_warning ("GtkDoc: warning: Headline elements not supported");
current_builder.append ("\n");
hl.accept_children (this);
current_builder.append ("\n");
@@ -144,7 +144,7 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
break;
default:
- reporter.simple_warning ("GtkDoc: unsupported list type: %s", list.bullet.to_string ());
+ reporter.simple_warning ("GtkDoc: warning: unsupported list type: %s", list.bullet.to_string ());
break;
}
@@ -278,7 +278,7 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
} else if (t is Taglets.Link) {
((Taglets.Link)t).produce_content().accept (this);
} else {
- reporter.simple_warning ("GtkDoc: Taglet not supported"); // TODO
+ reporter.simple_warning ("GtkDoc: warning: Taglet not supported"); // TODO
}
current_builder = (owned)old_builder;
}
diff --git a/src/doclets/gtkdoc/dbus.vala b/src/doclets/gtkdoc/dbus.vala
index c49560b..c9f0a5f 100644
--- a/src/doclets/gtkdoc/dbus.vala
+++ b/src/doclets/gtkdoc/dbus.vala
@@ -142,7 +142,7 @@ namespace Gtkdoc.DBus {
var xml_file = Path.build_filename (xml_dir, "%s.xml".printf (to_docbook_id (name)));
var writer = new TextWriter (xml_file, "w");
if (!writer.open ()) {
- reporter.simple_error ("GtkDoc: unable to open %s for writing", writer.filename);
+ reporter.simple_error ("GtkDoc: error: unable to open %s for writing", writer.filename);
return false;
}
writer.write_line (to_string (reporter));
diff --git a/src/doclets/gtkdoc/doclet.vala b/src/doclets/gtkdoc/doclet.vala
index bdf20e8..e0fe5b5 100644
--- a/src/doclets/gtkdoc/doclet.vala
+++ b/src/doclets/gtkdoc/doclet.vala
@@ -57,7 +57,7 @@ namespace Gtkdoc.Config {
unowned string[] gtkdoc_args = args;
opt_context.parse (ref gtkdoc_args);
} catch (OptionError e) {
- reporter.simple_error ("GtkDoc: Error: %s\nRun '-X --help' to see a full list of available command line options.", e.message);
+ reporter.simple_error ("GtkDoc: error: %s\nRun '-X --help' to see a full list of available command line options.", e.message);
return false;
}
@@ -155,7 +155,7 @@ public class Gtkdoc.Director : Valadoc.Doclet, Object {
}
if (!copy_file (filename, Path.build_filename (comments_dir, Path.get_basename (filename)))) {
- reporter.simple_error ("GtkDoc: Can't copy %s", filename);
+ reporter.simple_error ("GtkDoc: error: Can't copy %s", filename);
}
}
@@ -186,7 +186,7 @@ public class Gtkdoc.Director : Valadoc.Doclet, Object {
prepared += filename;
if (!FileUtils.test (filename, FileTest.EXISTS)) {
- reporter.simple_error ("GtkDoc: %s not found", relative_filename);
+ reporter.simple_error ("GtkDoc: error: %s not found", relative_filename);
continue;
}
@@ -195,12 +195,12 @@ public class Gtkdoc.Director : Valadoc.Doclet, Object {
} else if (filename.has_suffix (".h")) {
prepare_h_file (filename);
} else {
- reporter.simple_error ("GtkDoc: %s is not a supported source file type. Only .h, and .c files are supported.", relative_filename);
+ reporter.simple_error ("GtkDoc: error: %s is not a supported source file type. Only .h, and .c files are supported.", relative_filename);
}
}
if (vala_headers.length <= 0) {
- reporter.simple_error ("GtkDoc: No vala header found");
+ reporter.simple_error ("GtkDoc: error: No vala header found");
}
return reporter.errors == 0;
@@ -235,7 +235,7 @@ public class Gtkdoc.Director : Valadoc.Doclet, Object {
try {
Process.spawn_sync (settings.path, args, null, SpawnFlags.SEARCH_PATH, null, null, null);
} catch (Error e) {
- reporter.simple_error ("gtkdoc-scan: %s", e.message);
+ reporter.simple_error ("gtkdoc-scan: error: %s", e.message);
return false;
}
@@ -277,7 +277,7 @@ public class Gtkdoc.Director : Valadoc.Doclet, Object {
string cflags;
Process.spawn_sync (null, pc_cflags, null, SpawnFlags.SEARCH_PATH, null, out cflags, out stderr, out status);
if (status != 0) {
- reporter.simple_error ("GtkDoc: pkg-config cflags error: %s", stderr);
+ reporter.simple_error ("GtkDoc: error: pkg-config cflags error: %s", stderr);
return false;
}
cflags = cflags.strip ();
@@ -285,7 +285,7 @@ public class Gtkdoc.Director : Valadoc.Doclet, Object {
string libs;
Process.spawn_sync (null, pc_libs, null, SpawnFlags.SEARCH_PATH, null, out libs, out stderr, out status);
if (status != 0) {
- reporter.simple_error ("GtkDoc: pkg-config libs error: %s", stderr);
+ reporter.simple_error ("GtkDoc: error: pkg-config libs error: %s", stderr);
return false;
}
@@ -309,7 +309,7 @@ public class Gtkdoc.Director : Valadoc.Doclet, Object {
Process.spawn_sync (settings.path, args, env, SpawnFlags.SEARCH_PATH, null, null, null);
} catch (Error e) {
- reporter.simple_error ("gtkdoc-scangobj: %s", e.message);
+ reporter.simple_error ("gtkdoc-scangobj: error: %s", e.message);
return false;
}
@@ -332,7 +332,7 @@ public class Gtkdoc.Director : Valadoc.Doclet, Object {
try {
Process.spawn_sync (settings.path, args, null, SpawnFlags.SEARCH_PATH, null, null, null);
} catch (Error e) {
- reporter.simple_error ("gtkdoc-mkdb: %s", e.message);
+ reporter.simple_error ("gtkdoc-mkdb: error: %s", e.message);
return false;
}
@@ -342,7 +342,7 @@ public class Gtkdoc.Director : Valadoc.Doclet, Object {
try {
FileUtils.get_contents (main_file, out contents);
} catch (Error e) {
- reporter.simple_error ("GtkDoc: Error while reading main file '%s' contents: %s", main_file, e.message);
+ reporter.simple_error ("GtkDoc: error: Error while reading main file '%s' contents: %s", main_file, e.message);
return false;
}
@@ -374,7 +374,7 @@ public class Gtkdoc.Director : Valadoc.Doclet, Object {
try {
FileUtils.set_contents (main_file, contents);
} catch (Error e) {
- reporter.simple_error ("GtkDoc: Error while writing main file '%s' contents: %s", main_file, e.message);
+ reporter.simple_error ("GtkDoc: error: Error while writing main file '%s' contents: %s", main_file, e.message);
return false;
}
}
@@ -396,7 +396,7 @@ public class Gtkdoc.Director : Valadoc.Doclet, Object {
settings.pkg_name, "../%s-docs.xml".printf (settings.pkg_name)},
null, SpawnFlags.SEARCH_PATH, null, null, null);
} catch (Error e) {
- reporter.simple_error ("gtkdoc-mkhtml: %s", e.message);
+ reporter.simple_error ("gtkdoc-mkhtml: error: %s", e.message);
return false;
}
@@ -409,7 +409,7 @@ public class Gtkdoc.Director : Valadoc.Doclet, Object {
"--html-dir", html_dir },
null, SpawnFlags.SEARCH_PATH, null, null, null);
} catch (Error e) {
- reporter.simple_error ("gtkdoc-fixxref: %s", e.message);
+ reporter.simple_error ("gtkdoc-fixxref: error: %s", e.message);
return false;
}
diff --git a/src/doclets/gtkdoc/gcomment.vala b/src/doclets/gtkdoc/gcomment.vala
index 3b5c8b6..99c5f67 100644
--- a/src/doclets/gtkdoc/gcomment.vala
+++ b/src/doclets/gtkdoc/gcomment.vala
@@ -149,7 +149,7 @@ public class Gtkdoc.GComment {
} else if (header.name == "Since") {
since = header.value;
} else {
- reporter.simple_warning ("GtkDoc: Unknown versioning tag '%s'", header.name);
+ reporter.simple_warning ("GtkDoc: warning: Unknown versioning tag '%s'", header.name);
}
}
diff --git a/src/doclets/gtkdoc/generator.vala b/src/doclets/gtkdoc/generator.vala
index b1a1028..3bb57fc 100644
--- a/src/doclets/gtkdoc/generator.vala
+++ b/src/doclets/gtkdoc/generator.vala
@@ -68,7 +68,7 @@ public class Gtkdoc.Generator : Api.Visitor {
var sections_writer = new TextWriter (sections, "a");
if (!sections_writer.open ()) {
- reporter.simple_error ("GtkDoc: unable to open %s for writing", sections_writer.filename);
+ reporter.simple_error ("GtkDoc: error: unable to open %s for writing", sections_writer.filename);
return false;
}
@@ -78,7 +78,7 @@ public class Gtkdoc.Generator : Api.Visitor {
var cwriter = new TextWriter (Path.build_filename (code_dir, "%s.c".printf (basename)), "w");
if (!cwriter.open ()) {
- reporter.simple_error ("GtkDoc: unable to open %s for writing", cwriter.filename);
+ reporter.simple_error ("GtkDoc: error: unable to open %s for writing", cwriter.filename);
return false;
}
diff --git a/src/doclets/gtkdoc/utils.vala b/src/doclets/gtkdoc/utils.vala
index 942df9e..dd0fb45 100644
--- a/src/doclets/gtkdoc/utils.vala
+++ b/src/doclets/gtkdoc/utils.vala
@@ -172,7 +172,7 @@ namespace Gtkdoc {
Process.spawn_command_line_sync (pc, null, null, out exit_status);
return (0 == exit_status);
} catch (SpawnError e) {
- reporter.simple_warning ("GtkDoc: Error pkg-config --exists %s: %s", package_name, e.message);
+ reporter.simple_warning ("GtkDoc: warning: Error pkg-config --exists %s: %s", package_name, e.message);
return false;
}
}
diff --git a/src/libvaladoc/api/tree.vala b/src/libvaladoc/api/tree.vala
index 930ee29..55cfe6e 100644
--- a/src/libvaladoc/api/tree.vala
+++ b/src/libvaladoc/api/tree.vala
@@ -286,7 +286,7 @@ public class Valadoc.Api.Tree {
}
if (imported == false) {
- reporter.simple_error ("%s not found in specified import directories", pkg_name);
+ reporter.simple_error ("error: %s not found in specified import directories", pkg_name);
}
}
}
diff --git a/src/libvaladoc/content/embedded.vala b/src/libvaladoc/content/embedded.vala
index b8f4222..d287ca7 100644
--- a/src/libvaladoc/content/embedded.vala
+++ b/src/libvaladoc/content/embedded.vala
@@ -56,7 +56,8 @@ public class Valadoc.Content.Embedded : ContentElement, Inline, StyleAttributes
// search relative to the current directory / absoulte path
if (!FileUtils.test (url, FileTest.EXISTS | FileTest.IS_REGULAR)) {
- reporter.simple_error ("%s does not exist", url);
+ string node_segment = (container is Api.Package)? "" : container.get_full_name () + ": ";
+ reporter.simple_error ("%s: %s{{: error: %s does not exist", file_path, node_segment, url);
} else {
package = container.package;
}
diff --git a/src/libvaladoc/content/sourcecode.vala b/src/libvaladoc/content/sourcecode.vala
index e7cfe7b..70851d3 100644
--- a/src/libvaladoc/content/sourcecode.vala
+++ b/src/libvaladoc/content/sourcecode.vala
@@ -86,7 +86,7 @@ public class Valadoc.Content.SourceCode : ContentElement, Inline {
_language = Language.VALA;
}
- private string? get_path (string path, string source_file_path, ErrorReporter reporter) {
+ private string? get_path (string path, Api.Node container, string source_file_path, ErrorReporter reporter) {
// search relative to our file
if (!Path.is_absolute (path)) {
string relative_to_file = Path.build_path (Path.DIR_SEPARATOR_S, Path.get_dirname (source_file_path), path);
@@ -97,16 +97,17 @@ public class Valadoc.Content.SourceCode : ContentElement, Inline {
// search relative to the current directory / absoulte path
if (!FileUtils.test (path, FileTest.EXISTS | FileTest.IS_REGULAR)) {
+ string node_segment = (container is Api.Package)? "" : container.get_full_name () + ": ";
code = "File %s does not exist".printf (path);
- reporter.simple_warning (code);
+ reporter.simple_warning ("%s: %s{{{: warning: %s", source_file_path, node_segment, code);
return null;
}
return path;
}
- private void load_source_code (string _path, string source_file_path, ErrorReporter reporter) {
- string? path = get_path (_path, source_file_path, reporter);
+ private void load_source_code (string _path, Api.Node container, string source_file_path, ErrorReporter reporter) {
+ string? path = get_path (_path, container, source_file_path, reporter);
if (path == null) {
return ;
}
@@ -117,7 +118,8 @@ public class Valadoc.Content.SourceCode : ContentElement, Inline {
_language = Language.from_path (path);
code = (owned) content;
} catch (FileError err) {
- reporter.simple_error ("Can't read file: '%s': ", path, err.message);
+ string node_segment = (container is Api.Package)? "" : container.get_full_name () + ": ";
+ reporter.simple_error ("%s: %s{{{: error: Can't read file %s: %s", source_file_path, node_segment, path, err.message);
}
}
@@ -130,13 +132,14 @@ public class Valadoc.Content.SourceCode : ContentElement, Inline {
if (start.has_prefix ("include:")) {
start = (string) (((char*) start) + 8);
string path = start.strip ();
- load_source_code (path, file_path, reporter);
+ load_source_code (path, container, file_path, reporter);
} else {
string name = start._strip ().down ();
_language = Language.from_string (name);
code = splitted[1] ?? "";
if (_language == null && name != "none") {
- reporter.simple_warning ("Unsupported programming language '%s'", name);
+ string node_segment = (container is Api.Package)? "" : container.get_full_name () + ": ";
+ reporter.simple_warning ("%s: %s{{{: warning: Unsupported programming language '%s'", file_path, node_segment, name);
return ;
}
}
diff --git a/src/libvaladoc/content/wikilink.vala b/src/libvaladoc/content/wikilink.vala
index e08719f..5d0d22c 100644
--- a/src/libvaladoc/content/wikilink.vala
+++ b/src/libvaladoc/content/wikilink.vala
@@ -38,7 +38,8 @@ public class Valadoc.Content.WikiLink : InlineContent, Inline {
public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
page = api_root.wikitree.search (name);
if (page == null) {
- reporter.simple_warning ("%s does not exist".printf (name));
+ string node_segment = (container is Api.Package)? "" : container.get_full_name () + ": ";
+ reporter.simple_warning ("%s: %s[[: warning: %s does not exist".printf (file_path, node_segment, name));
return ;
}
}
diff --git a/src/libvaladoc/documentation/girmetadata.vala b/src/libvaladoc/documentation/girmetadata.vala
index 017e8ce..53c1e9e 100644
--- a/src/libvaladoc/documentation/girmetadata.vala
+++ b/src/libvaladoc/documentation/girmetadata.vala
@@ -83,7 +83,7 @@ public class Valadoc.GirMetaData : Object {
break;
default:
- reporter.simple_warning ("Unknown key 'General.%s' in '%s'", key, metadata_path);
+ reporter.simple_warning ("%s: warning: Unknown key 'General.%s'", metadata_path, key);
break;
}
}
@@ -105,10 +105,10 @@ public class Valadoc.GirMetaData : Object {
key_file = new KeyFile ();
key_file.load_from_file (metadata_path, KeyFileFlags.NONE);
} catch (KeyFileError e) {
- reporter.simple_error ("Key file error: '%s': in %s\n", metadata_path, e.message);
+ reporter.simple_error ("%s: error: %s\n", metadata_path, e.message);
return ;
} catch (FileError e) {
- reporter.simple_error ("File error: '%s': in %s\n", metadata_path, e.message);
+ reporter.simple_error ("%s: error: %s\n", metadata_path, e.message);
return ;
}
@@ -120,12 +120,12 @@ public class Valadoc.GirMetaData : Object {
break;
default:
- reporter.simple_warning ("Unknown group '%s' in %s\n", group, metadata_path);
+ reporter.simple_warning ("%s: warning: Unknown group '%s'\n", metadata_path, group);
break;
}
}
} catch (KeyFileError e) {
- reporter.simple_error ("%s: %s", metadata_path, e.message);
+ reporter.simple_error ("%s: error: %s", metadata_path, e.message);
}
}
}
diff --git a/src/libvaladoc/documentation/wiki.vala b/src/libvaladoc/documentation/wiki.vala
index 7ac9461..89440b2 100644
--- a/src/libvaladoc/documentation/wiki.vala
+++ b/src/libvaladoc/documentation/wiki.vala
@@ -68,7 +68,7 @@ public class Valadoc.WikiPage : Object, Documentation {
FileUtils.get_contents (this.path, out content);
this.documentation_str = content;
} catch (FileError err) {
- reporter.simple_error ("Unable to read file `%s': %s", this.path, err.message);
+ reporter.simple_error ("error: Unable to read file `%s': %s", this.path, err.message);
}
}
@@ -122,7 +122,7 @@ public class Valadoc.WikiPageTree : Object {
}
}
} catch (FileError err) {
- reporter.simple_error ("Unable to open directory `%s': %s", path, err.message);
+ reporter.simple_error ("error: Unable to open directory `%s': %s", path, err.message);
}
}
diff --git a/src/libvaladoc/importer/valadocdocumentationimporter.vala b/src/libvaladoc/importer/valadocdocumentationimporter.vala
index c0aa9d0..4f63d48 100644
--- a/src/libvaladoc/importer/valadocdocumentationimporter.vala
+++ b/src/libvaladoc/importer/valadocdocumentationimporter.vala
@@ -126,7 +126,7 @@ public class Valadoc.Importer.ValadocDocumentationImporter : DocumentationImport
if (symbol == null) {
if (settings.verbose) {
- reporter.simple_warning ("Node %s does not exist", symbol_name);
+ reporter.simple_warning ("%s: warning: Node %s does not exist", filename, symbol_name);
}
return ;
@@ -149,7 +149,7 @@ public class Valadoc.Importer.ValadocDocumentationImporter : DocumentationImport
_parser.parse ((string) content, filename, 0, 0);
}
} catch (FileError err) {
- reporter.simple_error ("Unable to map file `%s': %s", filename, err.message);
+ reporter.simple_error ("error: Unable to map file `%s': %s", filename, err.message);
} catch (ParserError err) {
}
}
diff --git a/src/libvaladoc/markupreader.vala b/src/libvaladoc/markupreader.vala
index 825b2b2..93495f9 100644
--- a/src/libvaladoc/markupreader.vala
+++ b/src/libvaladoc/markupreader.vala
@@ -87,7 +87,7 @@ public class Valadoc.MarkupReader : Object {
line = 1;
column = 1;
} catch (FileError e) {
- reporter.simple_error ("Unable to map file `%s': %s", filename, e.message);
+ reporter.simple_error ("%s: error: Unable to map file: %s", filename, e.message);
}
}
@@ -127,7 +127,7 @@ public class Valadoc.MarkupReader : Object {
if (u != (unichar) (-1)) {
current += u.to_utf8 (null);
} else {
- reporter.simple_error ("invalid UTF-8 character");
+ reporter.simple_error ("%s:%d: error: invalid UTF-8 character", filename, line);
}
}
if (current == begin) {
@@ -253,7 +253,7 @@ public class Valadoc.MarkupReader : Object {
while (current < end && current[0] != end_char) {
unichar u = ((string) current).get_char_validated ((long) (end - current));
if (u == (unichar) (-1)) {
- reporter.simple_error ("invalid UTF-8 character");
+ reporter.simple_error ("%s:%d: error: invalid UTF-8 character", filename, line);
} else if (u == '&') {
char* next_pos = current + u.to_utf8 (null);
if (((string) next_pos).has_prefix ("amp;")) {
diff --git a/src/libvaladoc/moduleloader.vala b/src/libvaladoc/moduleloader.vala
index a4e8697..9033670 100644
--- a/src/libvaladoc/moduleloader.vala
+++ b/src/libvaladoc/moduleloader.vala
@@ -125,7 +125,7 @@ public class Valadoc.ModuleLoader : Object {
string[] segments = driverpath.split (".");
if (segments.length != 3 && segments.length != 4) {
- reporter.simple_error ("Invalid driver version format.");
+ reporter.simple_error ("error: Invalid driver version format.");
return null;
}
@@ -140,7 +140,7 @@ public class Valadoc.ModuleLoader : Object {
tmp &= int64.try_parse (segments[2], out segment_c);
if (!tmp) {
- reporter.simple_error ("Invalid driver version format.");
+ reporter.simple_error ("error: Invalid driver version format.");
return null;
}
@@ -162,7 +162,7 @@ public class Valadoc.ModuleLoader : Object {
}
- reporter.simple_error ("No suitable driver found.");
+ reporter.simple_error ("error: No suitable driver found.");
return null;
}
diff --git a/src/valadoc/valadoc.vala b/src/valadoc/valadoc.vala
index f03426b..7c6bdba 100644
--- a/src/valadoc/valadoc.vala
+++ b/src/valadoc/valadoc.vala
@@ -173,7 +173,7 @@ public class ValaDoc : Object {
doclet = modules.create_doclet (pluginpath);
if (doclet == null) {
- reporter.simple_error ("failed to load doclet");
+ reporter.simple_error ("error: failed to load doclet");
return null;
}
@@ -186,7 +186,7 @@ public class ValaDoc : Object {
driver = modules.create_driver (pluginpath);
if (driver == null) {
- reporter.simple_error ("failed to load driver");
+ reporter.simple_error ("error: failed to load driver");
return null;
}
@@ -298,7 +298,7 @@ public class ValaDoc : Object {
opt_context.add_main_entries (options, null);
opt_context.parse (ref args);
} catch (OptionError e) {
- reporter.simple_error (e.message);
+ reporter.simple_error ("error: %s", e.message);
stdout.printf ("Run '%s --help' to see a full list of available command line options.\n", args[0]);
return quit (reporter);
}
@@ -309,12 +309,12 @@ public class ValaDoc : Object {
}
if (directory == null) {
- reporter.simple_error ("No output directory specified.");
+ reporter.simple_error ("error: No output directory specified.");
return quit (reporter);
}
if (!check_pkg_name ()) {
- reporter.simple_error ("File already exists");
+ reporter.simple_error ("error: File already exists");
return quit (reporter);
}
@@ -322,18 +322,18 @@ public class ValaDoc : Object {
if (force == true) {
bool tmp = remove_directory (directory);
if (tmp == false) {
- reporter.simple_error ("Can't remove directory.");
+ reporter.simple_error ("error: Can't remove directory.");
return quit (reporter);
}
} else {
- reporter.simple_error ("File already exists");
+ reporter.simple_error ("error: File already exists");
return quit (reporter);
}
}
if (wikidirectory != null) {
if (!FileUtils.test(wikidirectory, FileTest.IS_DIR)) {
- reporter.simple_error ("Wiki-directory does not exist.");
+ reporter.simple_error ("error: Wiki-directory does not exist.");
return quit (reporter);
}
}
@@ -343,7 +343,7 @@ public class ValaDoc : Object {
int last_hyphen = gir_name.last_index_of_char ('-');
if (last_hyphen == -1 || !gir_name.has_suffix (".gir")) {
- reporter.simple_error ("GIR file name `%s' is not well-formed, expected NAME-VERSION.gir", gir_name);
+ reporter.simple_error ("error: GIR file name `%s' is not well-formed, expected NAME-VERSION.gir", gir_name);
return quit (reporter);
}
@@ -352,7 +352,7 @@ public class ValaDoc : Object {
gir_version.canon ("0123456789.", '?');
if (gir_namespace == "" || gir_version == "" || !gir_version[0].isdigit () || gir_version.contains ("?")) {
- reporter.simple_error ("GIR file name `%s' is not well-formed, expected NAME-VERSION.gir", gir_name);
+ reporter.simple_error ("error: GIR file name `%s' is not well-formed, expected NAME-VERSION.gir", gir_name);
return quit (reporter);
}
@@ -366,7 +366,7 @@ public class ValaDoc : Object {
}
if (report_warning == true) {
- reporter.simple_error ("No source file specified to be compiled to gir.");
+ reporter.simple_error ("error: No source file specified to be compiled to gir.");
return quit (reporter);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]