Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions propogated by 'ask' include stack trace in message #20

Open
OlduwanSteve opened this issue Jul 31, 2017 · 2 comments
Open

Exceptions propogated by 'ask' include stack trace in message #20

OlduwanSteve opened this issue Jul 31, 2017 · 2 comments

Comments

@OlduwanSteve
Copy link

If an inbox throws an exception then it seems like the ask ing process gets an exception where the original stack trace is appended to the message. In some scenarios it might be 'helpful' (relatively) to surface the message without exposing the stack trace but currently this would be hard.

Could the stack trace perhaps be included as exception data instead?

@louthy
Copy link
Owner

louthy commented Aug 1, 2017

@OlduwanSteve I'm a little unclear of what you're asking to be honest. Are you saying there isn't stack trace info and you want it? Or are you saying you don't want stack trace data? Grab me on Skype tomorrow and we can discuss it.

@OlduwanSteve
Copy link
Author

OlduwanSteve commented Aug 1, 2017

Here's some sample code:

    class Program
    {
        static ProcessId a;

        static void Main(string[] args)
        {
            ProcessConfig.initialise();
            a = spawn<int>("a", GetData);

            try
            {
                var dt = ask<int>(a, 0);
            }
            catch (ProcessException e)
            {
                Console.WriteLine(e.InnerException.Message);
            }
        }

        private static void GetData(int obj)
        {
            throw new Exception("fail");
        }
    }

This program outputs:

System.Exception: fail
   at ep_datatable_bug.Program.GetData(Int32 obj) in c:\Users\Steve\Documents\Visual Studio 2017\Projects\ep-datatable-bug\ep-datatable-bug\Program.cs:line 30
   at Echo.Process.<>c__DisplayClass141_0`1.<spawn>b__1(Unit state, T msg)
   at Echo.Actor`2.ProcessAsk(ActorRequest request)

But I would expect it to output:

fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants