Hi,<div><br></div><div>I&#39;m using a hidden iframe in my file upload component. If an error occurs during uploading, the error page is rendered in the hidden iframe - which means I end up debugging by inspecting the http responses in the browsers development tools. Not ideal so I thought I&#39;d trap the error and present the page myself. In the exception trap I send a script to the page which redirects the parent window to the error page - &#39;parent.parent.window.location.replace(..error url..)&#39; This works well apart from when I click on the &quot;debug&quot; link, the debugger in the Pharo reports: &quot;Error: context not in self&quot; and doesn&#39;t shows an unrelated (to the original error) stack trace.</div>
<div><br></div><div>I&#39;ve patched together my error handling code, by examining the error handling filter in Seaside. I&#39;ve had to add an accessor on WASession&gt;&gt;#continuations, which probably indicates there is an easier way to achieve my goal:</div>
<div><br></div><div><div>handleException: ex</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>| session requestContext key continuation renderContinuation |</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>requestContext := self requestContext.</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>session := requestContext session.</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>key := requestContext request fields at: session actionField.</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>continuation := session continuations at: key.</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>renderContinuation := continuation createRenderContinuation.</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>session presenter show: (WAWalkback current exception: ex) onAnswer: [:answer | </div><div><span class="Apple-tab-span" style="white-space:pre">                </span>answer ifTrue: [ </div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>self flag: #todo. &quot;work out why I get the error: &#39;Error: context not in self&#39;&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>GRPlatform current openDebuggerOn: ex ] ].</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;redirect the main page to the error location&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>self requestContext respond: </div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>[ :response | </div><div><span class="Apple-tab-span" style="white-space:pre">                </span>response</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>contentType: WAMimeType textHtml;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>nextPutAll: (WARenderCanvas builder</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>fullDocument: true;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>scriptGeneratorClass: JQScriptGenerator; &quot;removes the onload from body&quot;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>render: [ :html | </div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>html script: &#39;parent.parent.window.location.replace(&quot;&#39;, renderContinuation registerForUrl  greaseString, &#39;&quot;)&#39; ] )]</div>
</div><div><br></div><div>I&#39;ve a horrible feeling I&#39;m missing an obvious, simpler solution</div><div><br></div><div>Thanks,</div><div><br></div><div>Nick</div>