hi ivan,
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<ExceptionOperations>();
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 Carrero <[email protected]>wrote:
> 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?
> ---
> Met vriendelijke groeten - Best regards - Salutations
> Ivan Porto Carrero
> Blog: http://flanders.co.nz
> Twitter: http://twitter.com/casualjim
> Author of IronRuby in Action (http://manning.com/carrero)
>
>
> _______________________________________________
> Ironruby-core mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
>
--
Mit freundlichen Grüßen,
-- Meinrad Recheis
Geschäftsführer
eqqon GmbH
Friedmanngasse 32/20
1160 Wien, Österreich
Tel.: +43 (0) 681-103-122-67
Firma: eqqon GmbH
Rechtsform: Gesellschaft mit beschränkter Haftung
Firmensitz: Wien
Firmenbuchnummer: FN 327919 i
Firmenbuchgericht: Handelsgericht Wien
--
eqqon Disclaimer / Legal notice: http://www.eqqon.com/index.php/Disclaimer
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core