public OgreException(OgreException rhs) : this(OgrePINVOKE.new_OgreException__SWIG_2(OgreException.getCPtr(rhs)), true) { if (OgrePINVOKE.SWIGPendingException.Pending) { throw OgrePINVOKE.SWIGPendingException.Retrieve(); } }
private void checkOgreException() { if (Mogre.OgreException.IsThrown) { string a = ""; OgreException x = Mogre.OgreException.LastException; a += "Source: " + x.Source + "; Number: " + x.Number.ToString() + "; Description: " + x.Description; log("[ main() ] " + a); Mogre.OgreException.ClearLastException(); } }
/// <summary> /// Wczytuje daną reklamę z dysku i ładuje do TextureManagera. W przypadku błędu zwraca null /// </summary> /// <param name="ad"></param> /// <returns></returns> public string LoadAdTexture(Ad ad) { if (ad == null) { return(null); } string path = ad.path; try { // Image s = new Image(); // Image k = s.Load("7178C1654343ECCF358E8EEA0271100B.gif", "General"); // Image k = s.Load("1.gif", "General"); // TextureManager.Singleton.Load("../../media/FE55EF898AF9D8FE122A83882B98C32D.gif", "Ads"); if (path.EndsWith(".gif")) { // throw new Exception("nie ma obslugi gif"); } TextureManager.Singleton.Load(path, "Ads"); return(path); } catch (SEHException ex) { // nie można zdekodować obrazka? pobieranie jednak sie nie udalo? if (OgreException.IsThrown) { try { OgreException.ClearLastException(); File.Delete(path); } catch (Exception ex2) { } } return(null); } }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(OgreException obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }