/IronPython_Main/Languages/IronPython/IronPython/Runtime/Exceptions/PythonException.cs
C# | 58 lines | 51 code | 7 blank | 0 comment | 0 complexity | 6188807d1f950eab52524d017039a4b6 MD5 | raw file
Possible License(s): GPL-2.0, MPL-2.0-no-copyleft-exception, CPL-1.0, CC-BY-SA-3.0, BSD-3-Clause, ISC, AGPL-3.0, LGPL-2.1, Apache-2.0
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Runtime.Serialization;
- using Microsoft.Scripting.Runtime;
-
- namespace IronPython.Runtime.Exceptions {
- [Serializable]
- class PythonException : Exception, IPythonAwareException {
- private object _pyExceptionObject;
- private List<DynamicStackFrame> _frames;
- private TraceBack _traceback;
-
- public PythonException() : base() { }
- public PythonException(string msg) : base(msg) { }
- public PythonException(string message, Exception innerException)
- : base(message, innerException) {
- }
- #if !SILVERLIGHT // SerializationInfo
- protected PythonException(SerializationInfo info, StreamingContext context) : base(info, context) { }
- #endif
-
- object IPythonAwareException.PythonException {
- get {
- return _pyExceptionObject;
- }
- set {
- _pyExceptionObject = value;
- }
- }
-
- List<DynamicStackFrame> IPythonAwareException.Frames {
- get { return _frames; }
- set { _frames = value; }
- }
-
- TraceBack IPythonAwareException.TraceBack {
- get { return _traceback; }
- set { _traceback = value; }
- }
- }
-
- interface IPythonAwareException {
- object PythonException {
- get;
- set;
- }
- List<DynamicStackFrame> Frames {
- get;
- set;
- }
-
- TraceBack TraceBack {
- get;
- set;
- }
- }
- }