コード例 #1
0
 /// <summary>
 /// Constructs a new <c>HsqlDataSourceException</c> instance
 /// from the specified serialization information and context.
 /// </summary>
 /// <param name="info">
 /// The <see cref="SerializationInfo"/> that holds the serialized
 /// object data from which to construct the exception.
 /// </param>
 /// <param name="context">
 /// The <see cref="StreamingContext"/> that contains contextual
 /// information about the source or destination.
 ///</param>
 public HsqlDataSourceException(SerializationInfo info,
                                StreamingContext context) : base(info, context)
 {
     m_code       = (int)info.GetValue("m_code", typeof(int));
     m_state      = (string)info.GetValue("m_state", typeof(string));
     m_exceptions = (HsqlDataSourceExceptionCollection)info.GetValue(
         "m_exceptions",
         typeof(HsqlDataSourceExceptionCollection));
 }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="HsqlDataSourceException"/> class.
        /// </summary>
        /// <param name="message">The error message.</param>
        /// <param name="errorCode">The vendor error code.</param>
        /// <param name="sqlState">The SQLSTATE code.</param>
        /// <param name="chain">The exception chain.</param>
        public HsqlDataSourceException(string message, int errorCode,
                                       string sqlState, IEnumerable <HsqlDataSourceException> chain)
            : this(message, errorCode, sqlState)
        {
            if (chain != null)
            {
                HsqlDataSourceExceptionCollection exceptions = this.Exceptions;

                foreach (HsqlDataSourceException exception in chain)
                {
                    exceptions.Add(exception);
                }
            }
        }
コード例 #3
0
 /// <summary>
 /// Constructs a new <c>HsqlDataSourceException</c> instance
 /// from the specified serialization information and context.
 /// </summary>
 /// <param name="info">
 /// The <see cref="SerializationInfo"/> that holds the serialized
 /// object data from which to construct the exception.
 /// </param>
 /// <param name="context">
 /// The <see cref="StreamingContext"/> that contains contextual
 /// information about the source or destination.
 ///</param>
 public HsqlDataSourceException(SerializationInfo info,
     StreamingContext context)
     : base(info, context)
 {
     m_code = (int)info.GetValue("m_code", typeof(int));
     m_state = (string)info.GetValue("m_state", typeof(string));
     m_exceptions = (HsqlDataSourceExceptionCollection) info.GetValue(
         "m_exceptions",
         typeof(HsqlDataSourceExceptionCollection));
 }