Ivan Porto Carrero
2009-Jul-30  20:18 UTC
[Ironruby-core] Error messages when hosting IronRuby
catch (Exception exception)
            {
                var exceptionService =
Engine.GetService<ExceptionOperations>();
                string msg, typeName;
                exceptionService.GetExceptionMessage(exception, out
msg, out typeName);
                var trace = exceptionService.FormatException(exception);
                throw new RuntimeError(string.Format("{0} threw an
error.{1}{2}{1}{1}Trace:{1}{3}",
                    typeName, Environment.NewLine, msg, trace));
            }
---
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)
On Thu, Jul 30, 2009 at 9:57 PM, Martin Smith <martin.smith.jr at
gmail.com>wrote:
> Hello,
>
> I''ve been experimenting with hosting IronRuby in my application,
and one of
> the problems I''m having is that it''s not giving me very
good error messages
> or any kind of stack trace when it runs into an error.  The problem is
> magnified when i load or "require" any other ruby files because
syntax
> errors could be anywhere.  During execution, I''ve also got no idea
where the
> errors are coming from and it''s forcing me do much psychic
debugging in my
> IR app.  Is there any way to get better errors from IronRuby?
>
> Right now i''m using engine.Execute and ExecuteFile to run hosted
code.
>
> Thanks in advance,
> Martin
>
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/ironruby-core/attachments/20090730/d15d41b6/attachment.html>