<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#copied {background-color:#ccccff;}
tr.alt #copied {background-color:#bbbbf7;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="5">Commit in <b><tt>as2api/trunk/as2api/lib</tt></b></td></tr>
<tr><td><tt><a href="#file1">api_loader.rb</a></tt> </td><td></td><td align="right" id="added">+8</td><td align="right" id="removed">-4</td><td nowrap="nowrap" align="center">355 -> 356</td></tr>
</table>
<pre class="comment">
Simplify some error reporting code
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">as2api/trunk/as2api/lib</span><br />
<div class="fileheader"><big><b>api_loader.rb</b></big> <small id="info">355 -> 356</small></div>
<pre class="diff"><small id="info">--- trunk/as2api/lib/api_loader.rb        2006-04-02 22:15:39 UTC (rev 355)
+++ trunk/as2api/lib/api_loader.rb        2006-04-02 23:48:11 UTC (rev 356)
@@ -487,6 +487,10 @@
</small></pre><pre class="diff" id="context">
private
</pre><pre class="diff" id="added">+ def err(filename, lineno, msg)
+ $stderr.puts "#{filename}:#{lineno}: #{msg}"
+ end
+
</pre><pre class="diff" id="context"> def create_default_global_namespace
ns = {}
ns[AS_VOID.qualified_name] = AS_VOID
</pre><pre class="diff"><small id="info">@@ -523,7 +527,7 @@
</small></pre><pre class="diff" id="context"> if real_type
        type_proxy.resolved_type = real_type
else
</pre><pre class="diff" id="removed">-        $stderr.puts "#{astype.input_filename}:#{type_proxy.lineno}: Found no definition of type known locally as #{type_proxy.local_name.inspect}"
</pre><pre class="diff" id="added">+        err(astype.input_filename, type_proxy.lineno, "Found no definition of type known locally as #{type_proxy.local_name.inspect}")
</pre><pre class="diff" id="context"> end
end
end
</pre><pre class="diff"><small id="info">@@ -535,7 +539,7 @@
</small></pre><pre class="diff" id="context"> if import_type
        local_namespace[type_name.last.body] = import_type
else
</pre><pre class="diff" id="removed">-        $stderr.puts "#{astype.input_filename}:#{type_name.first.lineno}: Couldn't resolve import of #{type_name.join(".").inspect}"
</pre><pre class="diff" id="added">+        err(astype.input_filename, type_name.first.lineno, "Couldn't resolve import of #{type_name.join(".").inspect}")
</pre><pre class="diff" id="context"> end
end
end
</pre><pre class="diff"><small id="info">@@ -544,12 +548,12 @@
</small></pre><pre class="diff" id="context"> astype.import_list.each_package do |package_name|
pkg = type_aggregator.package(package_name.join("."))
unless pkg
</pre><pre class="diff" id="removed">-        $stderr.puts "#{astype.input_filename}:#{package_name.first.lineno}: couldn't find package #{package_name.join(".").inspect}"
</pre><pre class="diff" id="added">+        err(astype.input_filename, package_name.first.lineno, "Couldn't find package #{package_name.join(".").inspect}")
</pre><pre class="diff" id="context">         next
end
pkg.each_type do|package_type|
        if local_namespace.has_key?(package_type.unqualified_name)
</pre><pre class="diff" id="removed">-         $stderr.puts "#{astype.input_filename}: #{package_type.unqualified_name} already refers to #{local_namespace[package_type.unqualified_name].qualified_name}"
</pre><pre class="diff" id="added">+         err(astype.input_filename, package_name.first.lineno, "#{package_type.unqualified_name} already refers to #{local_namespace[package_type.unqualified_name].qualified_name}")
</pre><pre class="diff" id="context">         end
        local_namespace[package_type.unqualified_name] = package_type
end
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.12</small></center>
</body></html>