[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Review Request 110964: kioclient: error messages do not identify their source
From:       "Jonathan Marten" <jjm () keelhaul ! me ! uk>
Date:       2013-06-13 9:22:42
Message-ID: 20130613092242.25478.68290 () vidsolbach ! de
[Download RAW message or body]

> On June 12, 2013, 8:45 p.m., David Faure wrote:
> > kioclient/kioclient.cpp, line 393
> > <http://git.reviewboard.kde.org/r/110964/diff/1/?file=149640#file149640line393>
> > 
> > The %2/%1 order is a bit surprising, but ok, why not :-)

Though it may be better not to change the already existing substitution, but can \
correct this for consistency with the other error messages.


- Jonathan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110964/#review34250
-----------------------------------------------------------


On June 12, 2013, 12:15 p.m., Jonathan Marten wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110964/
> -----------------------------------------------------------
> 
> (Updated June 12, 2013, 12:15 p.m.)
> 
> 
> Review request for KDE Runtime.
> 
> 
> Description
> -------
> 
> While investigating another problem (which turned out to be not the fault of KDE at \
> all), I encountered this mysterious message on stderr: 
> Syntax Error: Not enough arguments
> 
> It took a long time to track down the source of this message and find out that it \
> was from kioclient.  If kioclient had given its name in the error message, as most \
> Unix commands do, then the source of the message would have been obvious and made \
> investigation easier. 
> 
> Diffs
> -----
> 
> kioclient/kioclient.cpp d879980 
> 
> Diff: http://git.reviewboard.kde.org/r/110964/diff/
> 
> 
> Testing
> -------
> 
> Built kioclient with these changes, verified error message output.
> 
> $ kioclient exec
> kioclient: Syntax error, not enough arguments
> $ kioclient exec a b c
> kioclient: Syntax error, too many arguments
> $ kioclient foo
> kioclient: Syntax error, unknown command 'foo'
> $
> 
> 
> Thanks,
> 
> Jonathan Marten
> 
> 


[Attachment #3 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/110964/">http://git.reviewboard.kde.org/r/110964/</a>
  </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On June 12th, 2013, 8:45 p.m. UTC, <b>David \
Faure</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="http://git.reviewboard.kde.org/r/110964/diff/1/?file=149640#file149640line393" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kioclient/kioclient.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">bool \
ClientApp::doIt()</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">393</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">fprintf</span><span class="p">(</span> <span class="n">stderr</span><span \
class="p">,</span> <span class="s">&quot;%s&quot;</span><span class="p">,</span> \
<span class="n">i18n</span><span class="p"><span class="hl">(</span></span><span \
class="s"><span class="hl">&quot;</span>Syntax <span class="hl">E</span>rror<span \
class="hl">: U</span>nknown command &#39;%1&#39;</span><span \
class="se">\n</span><span class="s">&quot;</span><span class="p">,</span> <span \
class="n">QString</span><span class="o">::</span><span \
class="n">fromLocal8Bit</span><span class="p">(</span><span \
class="n">command</span><span class="p">)).</span><span \
class="n">toLocal8Bit</span><span class="p">().</span><span \
class="n">data</span><span class="p">()</span> <span class="p">);</span></pre></td>  \
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">393</font></th>  <td bgcolor="#fdfebc" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">fprintf</span><span class="p">(</span> <span class="n">stderr</span><span \
class="p">,</span> <span class="s">&quot;%s&quot;</span><span class="p">,</span> \
<span class="n">i18n<span class="hl">c</span></span><span class="p"><span \
class="hl">(</span></span><span class="s"><span \
class="hl">&quot;@info:shell&quot;</span></span><span class="p"><span \
class="hl">,</span></span><span class="hl"> </span><span class="s"><span \
class="hl">&quot;%2: </span>Syntax <span class="hl">e</span>rror<span class="hl">, \
u</span>nknown command &#39;%1&#39;</span><span class="se">\n</span><span \
class="s">&quot;</span><span class="p">,</span> <span class="n">QString</span><span \
class="o">::</span><span class="n">fromLocal8Bit</span><span class="p">(</span><span \
class="n">command</span><span class="p">)<span class="hl">,</span></span><span \
class="hl"> </span><span class="n"><span cl  ass="hl">appName</span></span><span \
class="p">).</span><span class="n">toLocal8Bit</span><span class="p">().</span><span \
class="n">data</span><span class="p">()</span> <span class="p">);</span></pre></td>  \
</tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The %2/%1 order is a bit \
surprising, but ok, why not :-)</pre>  </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Though it \
may be better not to change the already existing substitution, but can correct this \
for consistency with the other error messages. </pre>
<br />




<p>- Jonathan</p>


<br />
<p>On June 12th, 2013, 12:15 p.m. UTC, Jonathan Marten wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for KDE Runtime.</div>
<div>By Jonathan Marten.</div>


<p style="color: grey;"><i>Updated June 12, 2013, 12:15 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">While investigating another problem (which turned out to be not the \
fault of KDE at all), I encountered this mysterious message on stderr:

Syntax Error: Not enough arguments

It took a long time to track down the source of this message and find out that it was \
from kioclient.  If kioclient had given its name in the error message, as most Unix \
commands do, then the source of the message would have been obvious and made \
investigation easier. </pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Built kioclient with these changes, verified error message output.

$ kioclient exec
kioclient: Syntax error, not enough arguments
$ kioclient exec a b c
kioclient: Syntax error, too many arguments
$ kioclient foo
kioclient: Syntax error, unknown command &#39;foo&#39;
$
</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>kioclient/kioclient.cpp <span style="color: grey">(d879980)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/110964/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic