File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using System . Globalization ;
2
3
using System . Runtime . InteropServices ;
3
4
4
5
namespace LibGit2Sharp . Core
@@ -83,7 +84,14 @@ public IntPtr MarshalManagedToNative(Object managedObj)
83
84
84
85
if ( null == filePath )
85
86
{
86
- throw new MarshalDirectiveException ( "FilePathMarshaler must be used on a FilePath." ) ;
87
+ var expectedType = typeof ( FilePath ) ;
88
+ var actualType = managedObj . GetType ( ) ;
89
+
90
+ throw new MarshalDirectiveException (
91
+ string . Format ( CultureInfo . InvariantCulture ,
92
+ "FilePathMarshaler must be used on a FilePath. Expected '{0}' from '{1}'; received '{2}' from '{3}'." ,
93
+ expectedType . FullName , expectedType . Assembly . Location ,
94
+ actualType . FullName , actualType . Assembly . Location ) ) ;
87
95
}
88
96
89
97
return FromManaged ( filePath ) ;
You can’t perform that action at this time.
0 commit comments