add message to SQLO database module check

This commit is contained in:
Elijah Duffy
2025-06-03 15:11:23 -07:00
parent 8bedc3466f
commit 120d0789a0

2
db.go
View File

@@ -35,7 +35,7 @@ var (
// SQLO returns the current SQL database handle. // SQLO returns the current SQL database handle.
func SQLO() *sql.DB { func SQLO() *sql.DB {
dbModule.RequireLoaded() // ensure the module is loaded before accessing the database dbModule.RequireLoaded("dbx.SQLO requires database module") // ensure the module is loaded before accessing the database
if sqlDB == nil { if sqlDB == nil {
panic("SQL database not initialized") panic("SQL database not initialized")
} }