当前位置: 首页>>代码示例>>C#>>正文


C# Error.ToString方法代码示例

本文整理汇总了C#中Error.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Error.ToString方法的具体用法?C# Error.ToString怎么用?C# Error.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Error的用法示例。


在下文中一共展示了Error.ToString方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SerializeError

 private static JToken SerializeError(Error error)
 {
     var result = new JObject();
     result["$type"] = "error";
     var value = new JObject();
     value["message"] = error.ToString();
     result["value"] = value;
     return result;
 }
开发者ID:darcy-buttrose,项目名称:typescript-webpack,代码行数:9,代码来源:ResponseSerializer.cs

示例2: Test_Error

 public void Test_Error()
 {
     Error err = new Error(doc);
     err.Message = "foo";
     Assert.AreEqual("<stream:error " +
         "xmlns:stream=\"http://etherx.jabber.org/streams\">foo</stream:error>", err.ToString());
     ElementFactory sf = new ElementFactory();
     sf.AddType(new fact());
     XmlQualifiedName qname = new XmlQualifiedName(err.LocalName, err.NamespaceURI);
     Element p = (Element) sf.GetElement(err.Prefix, qname, doc);
     Assert.AreEqual(typeof(Error), p.GetType());
 }
开发者ID:rankida,项目名称:HangoutPhone,代码行数:12,代码来源:StreamTest.cs

示例3: HandleError

 public static void HandleError(Error e)
 {
     switch (e) {
     case Error.NoError: return;
     case Error.NoSuchFileOrDirectory: throw new FileNotFoundException ();
     case Error.PermissionDenied: throw new AccessViolationException ();
     default:
         throw new Exception ("Error: " + e.ToString ());
     }
 }
开发者ID:gatm50,项目名称:monoberry,代码行数:10,代码来源:Camera.cs

示例4: OnLogin

 //------------------------------
 //ログイン時の処理.
 //------------------------------
 void OnLogin(Error error)
 {
     if (error == null)
     {
         //端末の回転を制御(縦持ちを許可する)/controll screen orientation in mobile
         //if (!GameController.isIOS8) {
             Screen.autorotateToPortrait = true;
             Screen.autorotateToPortraitUpsideDown = true;
         //}
         //GUI表示/show GUI
         FASGui.ShowGUI(FASGui.Mode.Forum | FASGui.Mode.Leaderboards | FASGui.Mode.MyProfile | FASGui.Mode.GroupMessage, FASGui.Mode.Forum);
     }
     else
     {
         Debug.LogError(error.ToString());
     }
 }
开发者ID:silversunset1018,项目名称:chicken-balloon,代码行数:20,代码来源:FresviiForumGUI.cs

示例5: FormatError

 public static string FormatError(Error e)
 {
     //return string.Format("Path:{0}, Row:{1}, Col:{2}\n{3}:{4}", e.Path, e.Row, e.Col, e.GetType().Name, e.Message);
     return string.Format("Path:{0}, Row:{1}, Col:{2}\n{3}:{4}", e.Path, e.Row, e.Col, e.GetType().Name,
         e.ToString().Replace(@"C:\Documents and Settings\user1\My Documents\Visual Studio 2005\Projects\Nana\","")
         );
 }
开发者ID:quwahara,项目名称:Nana,代码行数:7,代码来源:LineEditMode.cs

示例6: Error

 public static void Error(string token, Error error, string text)
 {
     Console.WriteLine("Error " + error.ToString() + "on token \"" + token + "\": " + text);
 }
开发者ID:regedit-lv,项目名称:metamorphosis,代码行数:4,代码来源:Log.cs

示例7: FormatError

		internal static string FormatError(Error code, int pos) {
			return string.Format(SR.ErrorFormat, code.ToString(), pos, (int)code);
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:3,代码来源:ErrorFormator.cs

示例8: manageError

		private void manageError(Error error)
		{
			if (error != null)
				MessageBox.Show(error.ToString());
		}
开发者ID:meras0704,项目名称:Solution_Blatella.Common,代码行数:5,代码来源:Form1.cs

示例9: ThrowError

 /// <summary>
 /// Throw an error to the debugger.
 /// </summary>
 /// <param name="error">The <see cref="Error"/> to throw.</param>
 /// <returns><c>true</c> if the debugger has handled the error, <c>false</c> to continue on if it was ignored.</returns>
 public static bool ThrowError( Error error )
 {
     if( EnsureAttached( error.ToString() ) == false )
         return false;
     return Instance.Client.Handler.OnError( error );
 }
开发者ID:BradFuller,项目名称:pspplayer,代码行数:11,代码来源:Diag.cs

示例10: ThrowOnFailure


//.........这里部分代码省略.........

            case Error.FailsVerification:
                break;

            case Error.AddMethodNotImplemented:
                break;

            case Error.SchemaChangeNotImplemented:
                break;

            case Error.InvalidTypestate:
                break;

            case Error.HierarchyChangeNotImplemented:
                break;

            case Error.DeleteMethodNotImplemented:
                break;

            case Error.UnsupportedVersion:
                break;

            case Error.NamesDontMatch:
                break;

            case Error.ClassModifiersChangeNotImplemented:
                break;

            case Error.MethodModifiersChangeNotImplemented:
                break;

            case Error.NotImplemented:
                break;

            case Error.NullPointer:
                break;

            case Error.AbsentInformation:
                throw new MissingInformationException();

            case Error.InvalidEventType:
                break;

            case Error.IllegalArgument:
                break;

            case Error.OutOfMemory:
                break;

            case Error.AccessDenied:
                break;

            case Error.VmDead:
                break;

            case Error.Internal:
                break;

            case Error.UnattachedThread:
                break;

            case Error.InvalidTag:
                break;

            case Error.AlreadyInvoking:
                break;

            case Error.InvalidIndex:
                break;

            case Error.InvalidLength:
                break;

            case Error.InvalidString:
                break;

            case Error.InvalidClassLoader:
                break;

            case Error.InvalidArray:
                break;

            case Error.TransportLoad:
                break;

            case Error.TransportInit:
                break;

            case Error.NativeMethod:
                break;

            case Error.InvalidCount:
                break;

            default:
                break;
            }

            throw new InternalException((int)error, error.ToString());
        }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:101,代码来源:DebugErrorHandler.cs


注:本文中的Error.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。