1
0
mirror of https://github.com/fadden/6502bench.git synced 2025-02-19 14:31:07 +00:00

Add serialization constructor for exception

Plugins can throw AddressTranslateException, but it didn't have a
serialization constructor, so it couldn't be reconstituted on the
app side.
This commit is contained in:
Andy McFadden 2020-08-18 15:10:58 -07:00
parent a2e7c88fc9
commit b168db7750

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
using System; using System;
using System.Runtime.Serialization;
using CommonUtil; using CommonUtil;
namespace PluginCommon { namespace PluginCommon {
@ -93,8 +93,14 @@ namespace PluginCommon {
/// <summary> /// <summary>
/// Exception thrown by AddressTranslate's GetDataAtAddress(). /// Exception thrown by AddressTranslate's GetDataAtAddress().
/// </summary> /// </summary>
[Serializable]
public class AddressTranslateException : Exception { public class AddressTranslateException : Exception {
public AddressTranslateException() : base() { } public AddressTranslateException() : base() { }
public AddressTranslateException(string msg) : base(msg) { } public AddressTranslateException(string msg) : base(msg) { }
protected AddressTranslateException(SerializationInfo info, StreamingContext context) :
base(info, context) {
// base class handles everything
}
} }
} }