[Ironruby-core] Determining line number of runtime errors

Jim Deville jdeville at microsoft.com
Mon Dec 15 19:45:17 EST 2008

Has this been answered? I don't think it has yet. John, Tomas or Curt?

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Benjamin van der Veen
Sent: Thursday, December 11, 2008 11:56 AM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] Determining line number of runtime errors

Michael Letterle wrote:
> You should be able to pass in "-D" to ir.exe to get this information.

Oops, perhaps I should have been more specific about what I'm doing. I'm
not actually using ir.exe, I'm creating
ScriptRuntime/ScriptEngine/ScriptScope/ScriptSource in C# code.

I'm wrapping the call to aScriptSource.Execute(aScriptScope) in a
try-catch block. One of my catch blocks explicitly catches a
SyntaxErrorException, which as I mentioned before has a Line property. I
notice that runtime errors cause many different type of exceptions, so
I'm speculating that there must be some other mechanism for determining
what line the error occurred on.


Posted via http://www.ruby-forum.com/.
Ironruby-core mailing list
Ironruby-core at rubyforge.org

More information about the Ironruby-core mailing list