From 6975ad8dd7207481126ea4c992f673ab15afa4f8 Mon Sep 17 00:00:00 2001 From: Ilovepatatos Date: Fri, 12 Apr 2024 11:15:10 -0400 Subject: [PATCH] Bring back throws as log format --- src/Rust.UIFramework/Builder/BaseUiBuilder.Components.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Rust.UIFramework/Builder/BaseUiBuilder.Components.cs b/src/Rust.UIFramework/Builder/BaseUiBuilder.Components.cs index da96fec..1604be3 100644 --- a/src/Rust.UIFramework/Builder/BaseUiBuilder.Components.cs +++ b/src/Rust.UIFramework/Builder/BaseUiBuilder.Components.cs @@ -1,4 +1,5 @@ -using Oxide.Ext.UiFramework.Colors; +using Oxide.Core; +using Oxide.Ext.UiFramework.Colors; using Oxide.Ext.UiFramework.Controls; using Oxide.Ext.UiFramework.Enums; using Oxide.Ext.UiFramework.Exceptions; @@ -97,6 +98,7 @@ public UiRawImage WebImage(in UiReference parent, in UiPosition pos, in UiOffset { if (!url.StartsWith("http")) { + Interface.Oxide.LogWarning($"WebImage Url '{url}' is not a valid url. If trying to use a png id please use {nameof(ImageFileStorage)} instead."); return UiRawImage.CreateDefault(pos, offset); } @@ -124,6 +126,7 @@ public UiRawImage ImageFileStorage(in UiReference parent, in UiPosition pos, in { if (!uint.TryParse(png, out uint _)) { + Interface.Oxide.LogWarning($"Image PNG '{png}' is not a valid uint. If trying to use a url please use WebImage instead."); return UiRawImage.CreateDefault(pos, offset); }