From 669f475d792d5e9cca7151e9026f6b5b101df08d Mon Sep 17 00:00:00 2001 From: Kernell Date: Thu, 3 Dec 2015 16:46:43 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B1=D0=B0=D0=B3=20=D1=81=20=D0=BD=D0=B5=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D1=8C=D0=BD=D1=8B=D0=BC=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B8=D1=81=D0=BA=D0=BE=D0=BC=20=D0=BC=D0=B5=D1=82=D0=BE?= =?UTF-8?q?=D0=B4=D0=B0.=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=87=D0=B8?= =?UTF-8?q?=D0=BA=20=D0=B8=D1=81=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mta-mono/src/CMonoClass.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mta-mono/src/CMonoClass.cpp b/mta-mono/src/CMonoClass.cpp index f859ae6..9bb8ea0 100644 --- a/mta-mono/src/CMonoClass.cpp +++ b/mta-mono/src/CMonoClass.cpp @@ -141,14 +141,21 @@ MonoObject* CMonoClass::New( void** args, int argc ) return nullptr; } - CMonoMethod* pMethod = this->GetMethod( ".ctor", argc ); + MonoMethod* pMethod = this->GetMethodFromName( ".ctor", argc ); if( !pMethod ) { return nullptr; } - pMethod->Invoke( pObject, args, nullptr ); + MonoObject* pException = nullptr; + + mono_runtime_invoke( pMethod, pObject, args, &pException ); + + if( pException ) + { + this->GetDomain()->HandleException( pException ); + } return pObject; }