tmauldin / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

Only exception text is added to ModelException in IsolatedTask.cs #751

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Get an assembly loading exception when loading test dll
2. Try to find inner exception

What is the expected output? What do you see instead?
Would like to have access to the inner exception not just the exception message

in IsolatedTask.cs
Change
public object Run(object[] args)
        {
            try
            {
                return RunImpl(args);
            }
            catch (Exception ex)
            {
                throw new ModelException(ex.ToString());
            }
        }
to
public object Run(object[] args)
        {
            try
            {
                return RunImpl(args);
            }
            catch (Exception ex)
            {
                throw new ModelException(ex);
            }
        }
and maybe add constructor to ModelException that takes an exception object as 
only ctor arg

Please use labels and text to provide additional information.

Original issue reported on code.google.com by thomas.h...@gmail.com on 14 Oct 2010 at 12:31

GoogleCodeExporter commented 9 years ago
Good point!

Original comment by Yann.Tre...@gmail.com on 15 Oct 2010 at 10:58

GoogleCodeExporter commented 9 years ago

Original comment by Yann.Tre...@gmail.com on 15 Oct 2010 at 12:53

GoogleCodeExporter commented 9 years ago

Original comment by Yann.Tre...@gmail.com on 5 Dec 2010 at 11:33