NullReferenceException replaced with ArgumentNullException
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7040 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ee92e3c92a
commit
3825c088e4
2 changed files with 4 additions and 4 deletions
|
|
@ -28,7 +28,7 @@ class string;
|
|||
|
||||
%typemap(in, canthrow=1) string
|
||||
%{ if (!$input) {
|
||||
SWIG_CSharpSetPendingException(SWIG_CSharpNullReferenceException, "null string");
|
||||
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
|
||||
return $null;
|
||||
}
|
||||
$1 = std::string($input); %}
|
||||
|
|
@ -64,7 +64,7 @@ class string;
|
|||
|
||||
%typemap(in, canthrow=1) const string &
|
||||
%{ if (!$input) {
|
||||
SWIG_CSharpSetPendingException(SWIG_CSharpNullReferenceException, "null string");
|
||||
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
|
||||
return $null;
|
||||
}
|
||||
std::string $1_str($input);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue