Hi
When I use the console i get pretty error messages or at least error
messages without the stacktrace of IronRuby internal calls. How do I get
this pretty stack trace when hosting IronRuby in my own application?
this code snippet does the trick.
object result = null;
try
{
result = m_engine.Execute(code, scope);
}
catch (Exception e)
{
var exception_service =
m_engine.GetService();
string message, typeName;
exception_service.GetExceptionMessage(e, out message,
out
typeName);
var backtrace = exception_service.FormatException(e);
Console.WriteLine(backtrace);
}
hth,
– henon
On Tue, Jun 9, 2009 at 10:47 PM, Ivan Porto C. [email protected]wrote:
Firma: eqqon GmbH
Rechtsform: Gesellschaft mit beschränkter Haftung
Firmensitz: Wien
Firmenbuchnummer: FN 327919 i
Firmenbuchgericht: Handelsgericht Wien
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.