Exemplo n.º 1
0
 public ODBRuntimeException(NeoDatis.Odb.Core.IError error, string message) : base
         (string.Format("{0}\nVersion={1} , Build={2}, Date={3}, Thread={4}\nError:{5}\nStackTrace:{6}"
                        , message1, NeoDatis.Odb.Core.Release.ReleaseNumber, NeoDatis.Odb.Core.Release.ReleaseBuild
                        , NeoDatis.Odb.Core.Release.ReleaseDate, NeoDatis.Tool.Wrappers.OdbThread.GetCurrentThreadName
                            (), error.ToString(), message))
 {
 }
 public virtual void ManageDeleteTriggerAfter(string className, object @object, NeoDatis.Odb.OID
                                              oid)
 {
     if (HasDeleteTriggersFor(className))
     {
         NeoDatis.Odb.Core.Trigger.DeleteTrigger trigger  = null;
         System.Collections.IEnumerator          iterator = GetListOfDeleteTriggersFor(className).GetEnumerator
                                                                ();
         while (iterator.MoveNext())
         {
             trigger = (NeoDatis.Odb.Core.Trigger.DeleteTrigger)iterator.Current;
             if (trigger.GetOdb() == null)
             {
                 trigger.SetOdb(new NeoDatis.Odb.Impl.Main.ODBForTrigger(storageEngine));
             }
             try
             {
                 trigger.AfterDelete(Transform(@object), oid);
             }
             catch (System.Exception e)
             {
                 NeoDatis.Odb.Core.IError warning = NeoDatis.Odb.Core.NeoDatisError.AfterDeleteTriggerHasThrownException
                                                    .AddParameter(trigger.GetType().FullName).AddParameter(NeoDatis.Tool.Wrappers.OdbString
                                                                                                           .ExceptionToString(e, false));
                 if (NeoDatis.Odb.OdbConfiguration.DisplayWarnings())
                 {
                     NeoDatis.Tool.DLogger.Info(warning);
                 }
             }
         }
     }
 }
 public virtual void ManageUpdateTriggerAfter(string className, NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo
                                              oldNnoi, object newObject, NeoDatis.Odb.OID oid)
 {
     if (HasUpdateTriggersFor(className))
     {
         NeoDatis.Odb.Core.Trigger.UpdateTrigger trigger  = null;
         System.Collections.IEnumerator          iterator = GetListOfUpdateTriggersFor(className).GetEnumerator
                                                                ();
         while (iterator.MoveNext())
         {
             trigger = (NeoDatis.Odb.Core.Trigger.UpdateTrigger)iterator.Current;
             if (trigger.GetOdb() == null)
             {
                 trigger.SetOdb(new NeoDatis.Odb.Impl.Main.ODBForTrigger(storageEngine));
             }
             try
             {
                 trigger.AfterUpdate(new NeoDatis.Odb.Impl.Core.Server.Trigger.DefaultObjectRepresentation
                                         (oldNnoi), Transform(newObject), oid);
             }
             catch (System.Exception e)
             {
                 NeoDatis.Odb.Core.IError warning = NeoDatis.Odb.Core.NeoDatisError.AfterUpdateTriggerHasThrownException
                                                    .AddParameter(trigger.GetType().FullName).AddParameter(NeoDatis.Tool.Wrappers.OdbString
                                                                                                           .ExceptionToString(e, false));
                 if (NeoDatis.Odb.OdbConfiguration.DisplayWarnings())
                 {
                     NeoDatis.Tool.DLogger.Info(warning);
                 }
             }
         }
     }
 }
Exemplo n.º 4
0
 public CorruptedDatabaseException(NeoDatis.Odb.Core.IError error, string message)
     : base(error, message)
 {
 }
Exemplo n.º 5
0
 public CorruptedDatabaseException(NeoDatis.Odb.Core.IError error) : base(error)
 {
 }
Exemplo n.º 6
0
 public CorruptedDatabaseException(NeoDatis.Odb.Core.IError error, System.Exception
                                   t) : base(error, t)
 {
 }