1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-06-11 02:29:53 +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.
*/
using System;
using System.Runtime.Serialization;
using CommonUtil;
namespace PluginCommon {
@ -93,8 +93,14 @@ namespace PluginCommon {
/// <summary>
/// Exception thrown by AddressTranslate's GetDataAtAddress().
/// </summary>
[Serializable]
public class AddressTranslateException : Exception {
public AddressTranslateException() : base() { }
public AddressTranslateException(string msg) : base(msg) { }
protected AddressTranslateException(SerializationInfo info, StreamingContext context) :
base(info, context) {
// base class handles everything
}
}
}