diff --git a/Funktions/Json_Parse_Example.cs b/Funktions/Json_Parse_Example.cs index f64fdde..e68701f 100644 --- a/Funktions/Json_Parse_Example.cs +++ b/Funktions/Json_Parse_Example.cs @@ -13,8 +13,16 @@ class JsonParser // Get Data dynamic get_jsonData(string url) { + string json = ""; var webclient = new WebClient(); - string json = webclient.DownloadString(url); + try + { + json = webclient.DownloadString(url); + } + catch(WebException e) + { + throw e; + } dynamic dynJson = JsonConvert.DeserializeObject(json); return dynJson;