Thanks Ivan!!  That's exactly what I was looking for!

Martin

On Thu, Jul 30, 2009 at 1:18 PM, Ivan Porto Carrero <[email protected]>wrote:

>
> 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 
> <[email protected]>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
>> [email protected]
>> http://rubyforge.org/mailman/listinfo/ironruby-core
>>
>>
>
> _______________________________________________
> Ironruby-core mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
>
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to