<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>progress.solvepoint.com &#187; Phantom Errors</title>
	<atom:link href="http://progress.solvepoint.com/tag/phantom-errors/feed/" rel="self" type="application/rss+xml" />
	<link>http://progress.solvepoint.com</link>
	<description>Progress Blog - OpenEdge, WebSpeed, Sonic, 4GL, ABL, QAD, Epicor, and all things Progress</description>
	<lastBuildDate>Sat, 15 May 2010 18:29:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>OpenEdge ABL Phantom Error</title>
		<link>http://progress.solvepoint.com/2007/11/30/openedge-abl-phantom-error/</link>
		<comments>http://progress.solvepoint.com/2007/11/30/openedge-abl-phantom-error/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 22:58:52 +0000</pubDate>
		<dc:creator>JohnK</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Reliability]]></category>
		<category><![CDATA[Anti-patterns]]></category>
		<category><![CDATA[Phantom Errors]]></category>

		<guid isPermaLink="false">http://progress.solvepoint.com/2007/11/30/openedge-abl-phantom-error/</guid>
		<description><![CDATA[At Solvepoint we&#8217;ve coined a new term, the Phantom Error.   What is a Phantom Error you ask?  Well, it is an undesirable circumstance where the Progress VM decides to raise the error condition but leaves error-status:get-message() set to the empty string.
This , of course, can lead to a host of ugly sorts [...]]]></description>
			<content:encoded><![CDATA[<p>At Solvepoint we&#8217;ve coined a new term, the Phantom Error.   What is a Phantom Error you ask?  Well, it is an undesirable circumstance where the Progress VM decides to raise the error condition but leaves error-status:get-message() set to the empty string.</p>
<p>This , of course, can lead to a host of ugly sorts of bugs not the least of which is not having any idea where the error happened or why.</p>
<p>Here is a simple example that demonstrates a Phantom Error:</p>
<blockquote>
<pre><span style="color: #8b0000;">DEFINE NEW GLOBAL SHARED VARIABLE myHandle AS HANDLE NO-UNDO.</span><span style="color: #8b0000;">
</span><span style="color: #8b0000;">main: DO ON ERROR UNDO main, RETRY main:
  IF RETRY THEN do:
    MESSAGE RETURN-VALUE error-status:get-message(1) VIEW-AS ALERT-BOX.
    LEAVE main.
  END.</span>
<span style="color: #8b0000;">  RUN someProc IN myHandle.</span>
<span style="color: #8b0000;">END.</span></pre>
</blockquote>
<p>You&#8217;ll notice that both return-value and get-message(1) return blank.</p>
<p>If you happen to be in a terminal based procedure editor, however, you will receive the error message in the &#8220;message area&#8221; at the bottom.  Unfortunately, this doesn&#8217;t do much good for server code.</p>
<p>As a consequence, server code will typically swallow these Phantom Errors at worst, or report the error out of context at best.</p>
<p>So, what can be done? Diligent error trapping is called for.  Protect the code by always testing handles before using them.</p>
<p>Unfortunately, this isn&#8217;t the only type of code that will produce a Phantom Error.   We will discuss other Phantom Errors under the Tag &#8220;<a title="Phantom Errors" href="http://progress.solvepoint.com/tag/phantom-errors/">Phantom Errors</a>&#8221; in other posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://progress.solvepoint.com/2007/11/30/openedge-abl-phantom-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

