From bebd80f5a3715a4d3e7f1f2ed7a78ff7711c01b0 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 22 Jan 2020 12:19:46 +0100 Subject: Correct handling of error / removed debug statement In the vhdldocgen: - error should be handled in a doxygen consistent way (in this case with an err call) - removed left over debug statment (found through #7528) --- src/vhdldocgen.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 4619b7a..3abac3d 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -200,7 +200,7 @@ void VhdlDocGen::writeOverview() if (!f.open(IO_WriteOnly)) { - fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data()); + err("Warning: Cannot open file %s for writing\n",fileName.data()); return; } @@ -2932,14 +2932,14 @@ ferr: md->setBodyDef(fd); - QCString info="Info: Elaborating entity "+n1; - fd=ar->getFileDef(); - info+=" for hierarchy "; - QRegExp epr("[|]"); - QCString label=cur->type+":"+cur->write+":"+cur->name; - label.replace(epr,":"); - info+=label; - fprintf(stderr,"\n[%s:%d:%s]\n",fd->fileName().data(),cur->startLine,info.data()); + //QCString info="Info: Elaborating entity "+n1; + //fd=ar->getFileDef(); + //info+=" for hierarchy "; + //QRegExp epr("[|]"); + //QCString label=cur->type+":"+cur->write+":"+cur->name; + //label.replace(epr,":"); + //info+=label; + //fprintf(stderr,"\n[%s:%d:%s]\n",fd->fileName().data(),cur->startLine,info.data()); ar->insertMember(md); -- cgit v0.12 From f9672b168b7d3b06d845d7d0aaa039ec96f6f0c4 Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 30 Jan 2020 19:34:45 +0100 Subject: More accurate warning message. in code like `this command @unkn` would give (whilst all information is present) ``` warning: Found unknown command '\unkn' ``` instead of ``` warning: Found unknown command '@unkn' ``` --- src/docparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docparser.cpp b/src/docparser.cpp index 2d27ff9..889a014 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -5402,7 +5402,7 @@ int DocPara::handleCommand(const QCString &cmdName, const int tok) { case CMD_UNKNOWN: m_children.append(new DocWord(this,TK_COMMAND_CHAR(tok) + cmdName)); - warn_doc_error(g_fileName,doctokenizerYYlineno,"Found unknown command '\\%s'",qPrint(cmdName)); + warn_doc_error(g_fileName,doctokenizerYYlineno,"Found unknown command '%c%s'",TK_COMMAND_CHAR(tok),qPrint(cmdName)); break; case CMD_EMPHASIS: m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Italic,cmdName,TRUE)); -- cgit v0.12