Просмотр исходного кода

print an error on the terminal if the HttpBytesDevice fails to initialize

Yuri Iozzelli 9 месяцев назад
Родитель
Сommit
5c9fd74dea
1 измененных файлов с 9 добавлено и 1 удалено
  1. 9 1
      index.html

+ 9 - 1
index.html

@@ -368,7 +368,15 @@ __      __   _  __   ____  __
 				}
 				break;
 			case "bytes":
-				blockDevice = await CheerpX.HttpBytesDevice.create(image_url);
+				try
+				{
+					blockDevice = await CheerpX.HttpBytesDevice.create(image_url);
+				}
+				catch(e)
+				{
+					printOnTerm.printError([e]);
+					throw e;
+				}
 				break;
 			case "github":
 				blockDevice = await CheerpX.GitHubDevice.create(image_url);