From c044063d0287a80270632386b89a60f3c914066c Mon Sep 17 00:00:00 2001 From: Stephan Wald Date: Wed, 25 Sep 2019 17:13:54 +0200 Subject: [PATCH] fix: harden potential failure when second file is also not found --- BBjGridExWidget.bbj | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/BBjGridExWidget.bbj b/BBjGridExWidget.bbj index 1636fb0d..7f46ba7c 100644 --- a/BBjGridExWidget.bbj +++ b/BBjGridExWidget.bbj @@ -772,12 +772,17 @@ class public BBjGridExWidget extends BBjWidget implements BBjGridExWidgetColumns if isLocale = 0 then close (ch) dateJsLocalePath$ = distBase$ + "/i18n/Datejs/" + locale$ + ".js" - open (ch,err=*next)dateJsLocalePath$ - FI - - read record (ch,siz=5512000)script$ - close (ch) - #injectScript(script$) + open (ch,err=*next)dateJsLocalePath$;isLocale=1 + fi + if isLocale = 1 then + read record (ch,siz=5512000)script$ + close (ch) + #injectScript(script$) + else + a=msgbox("Error loading library for locale "+locale$,0,"Error") + fi + + ch=unt if #getDebug() = 1 then