diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-08-21 16:13:30 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-08-21 16:13:30 +0200 |
| commit | 7f3b87047828b7d8a250ec3e696361538fa7a3f4 (patch) | |
| tree | 6552de7c3f847be3249664ae178d8d0cd5cf2d49 /src/Interface.cs | |
| parent | 4464d8c4d183a963a0c39f5eea393529ebbbc013 (diff) | |
Avoid some null exception while layouting when parent not already set, and raise exception when goml file not found
Diffstat (limited to 'src/Interface.cs')
| -rw-r--r-- | src/Interface.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Interface.cs b/src/Interface.cs index 2fe25c60..3e0f8771 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -89,6 +89,9 @@ namespace go string root = "Object"; Stream stream = GetStreamFromPath (path); + if (stream == null) + throw new FileNotFoundException ("GOML file not found", path); + using (XmlReader reader = XmlReader.Create (stream)) { while (reader.Read()) { // first element is the root element |