efl_mono: move Eina.Error.Init() to a static constructor
this removes the need for the calling a Init function. Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br> Differential Revision: https://phab.enlightenment.org/D7556
This commit is contained in:
parent
1e2faf8527
commit
66824da950
|
@ -12,9 +12,6 @@ public class Config {
|
|||
public static void Init() {
|
||||
if (eina_init() == 0)
|
||||
throw (new Efl.EflException("Failed to initialize Eina"));
|
||||
|
||||
// Initialize the submodules here
|
||||
Eina.Error.Init();
|
||||
}
|
||||
|
||||
public static int Shutdown() {
|
||||
|
|
|
@ -39,7 +39,7 @@ public struct Error : IComparable<Error>
|
|||
return "Eina.Error(" + code + ")";
|
||||
}
|
||||
|
||||
internal static void Init()
|
||||
static Error()
|
||||
{
|
||||
UNHANDLED_EXCEPTION = eina_error_msg_register("Unhandled C# exception occurred.");
|
||||
}
|
||||
|
|
|
@ -5,6 +5,10 @@ namespace TestSuite
|
|||
|
||||
class TestEinaError
|
||||
{
|
||||
public static void basic_efl_error_available()
|
||||
{
|
||||
Test.AssertEquals(Eina.Error.UNHANDLED_EXCEPTION.Message, "Unhandled C# exception occurred.");
|
||||
}
|
||||
public static void basic_test()
|
||||
{
|
||||
Eina.Error.Clear();
|
||||
|
|
Loading…
Reference in New Issue