Add exception description on PDT parsing error.
This commit is contained in:
@@ -25,7 +25,7 @@ namespace Cryville.Crtr {
|
||||
public void LoadPdt(DirectoryInfo dir) {
|
||||
using (StreamReader pdtreader = new StreamReader(dir.FullName + "/" + data + ".pdt", Encoding.UTF8)) {
|
||||
var src = pdtreader.ReadToEnd();
|
||||
Root = new RulesetInterpreter(src, null).Interpret();
|
||||
Root = (PdtRuleset)new RulesetInterpreter(src, null).Interpret();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -4,8 +4,8 @@ using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Cryville.Crtr {
|
||||
internal class RulesetInterpreter : PdtInterpreter<PdtRuleset> {
|
||||
public RulesetInterpreter(string src, Binder binder) : base(src, binder) { }
|
||||
internal class RulesetInterpreter : PdtInterpreter {
|
||||
public RulesetInterpreter(string src, Binder binder) : base(src, typeof(PdtRuleset), binder) { }
|
||||
|
||||
readonly List<RulesetSelector> s = new List<RulesetSelector>();
|
||||
readonly List<string> a = new List<string>();
|
||||
|
@@ -30,7 +30,7 @@ namespace Cryville.Crtr {
|
||||
public void LoadPdt(DirectoryInfo dir) {
|
||||
using (StreamReader pdtreader = new StreamReader(dir.FullName + "/" + data + ".pdt", Encoding.UTF8)) {
|
||||
var src = pdtreader.ReadToEnd();
|
||||
Root = new SkinInterpreter(src, null).Interpret();
|
||||
Root = (PdtSkin)new SkinInterpreter(src, null).Interpret();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -4,8 +4,8 @@ using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Cryville.Crtr {
|
||||
public class SkinInterpreter : PdtInterpreter<PdtSkin> {
|
||||
public SkinInterpreter(string src, Binder binder) : base(src, binder) { }
|
||||
public class SkinInterpreter : PdtInterpreter {
|
||||
public SkinInterpreter(string src, Binder binder) : base(src, typeof(PdtSkin), binder) { }
|
||||
|
||||
readonly List<SkinSelector> s = new List<SkinSelector>();
|
||||
readonly List<string> a = new List<string>();
|
||||
|
Reference in New Issue
Block a user