CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
CallMethodException.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="CallMethodException.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>This exception is returned from the </summary>
7//-----------------------------------------------------------------------
8using System;
9using System.Security.Permissions;
10
12{
20 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")]
21 [Serializable()]
22 public class CallMethodException : Exception
23 {
24 private string _innerStackTrace;
25
33 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)")]
34 public override string StackTrace
35 {
36 get
37 {
38 return string.Format("{0}{1}{2}",
39 _innerStackTrace, Environment.NewLine, base.StackTrace);
40 }
41 }
42
48 public CallMethodException(string message, Exception ex)
49 : base(message, ex)
50 {
51 _innerStackTrace = ex.StackTrace;
52 }
53
59 protected CallMethodException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
60 : base(info, context)
61 {
62 _innerStackTrace = info.GetString("_innerStackTrace");
63 }
64
65
71 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods")]
72#if !NET5_0 && !NET6_0
73 [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
74 [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.SerializationFormatter)]
75#endif
76 public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
77 {
78 base.GetObjectData(info, context);
79 info.AddValue("_innerStackTrace", _innerStackTrace);
80 }
81 }
82}
This exception is returned from the CallMethod method in the server-side DataPortal and contains the ...
CallMethodException(string message, Exception ex)
Creates an instance of the type.
CallMethodException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
Creates an instance of the object for deserialization.
override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
Serializes the object.
override string StackTrace
Get the stack trace from the original exception.
@ Serializable
Prevents updating or inserting until the transaction is complete.