Implemented exception as error management mechanism and removed the error codes
This commit is contained in:
@ -1,4 +1,25 @@
|
||||
using System;
|
||||
/*
|
||||
|
||||
.NET bindings for the UnicornEngine Emulator Engine
|
||||
|
||||
Copyright(c) 2015 Antonio Parata
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
version 2 as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@ -20,14 +41,6 @@ namespace UnicornTests
|
||||
return res;
|
||||
}
|
||||
|
||||
public static void CheckError(Int32 err)
|
||||
{
|
||||
if (err != Common.UC_ERR_OK)
|
||||
{
|
||||
throw new ApplicationException("Operation failed, error: " + err);
|
||||
}
|
||||
}
|
||||
|
||||
public static Byte[] Int64ToBytes(UInt64 intVal)
|
||||
{
|
||||
var res = new Byte[8];
|
||||
|
Reference in New Issue
Block a user