Comparing version 10.118.0 to 10.119.0
@@ -152,2 +152,3 @@ (function() { | ||
} | ||
// @create_stdlib() if @_me.cfg.create_stdlib | ||
// @_create_sql_functions() | ||
@@ -234,2 +235,3 @@ // @_create_db_structure() | ||
}, | ||
// create_stdlib: true | ||
//..................................................................................................... | ||
@@ -236,0 +238,0 @@ dbay_with_transaction_cfg: { |
@@ -179,2 +179,49 @@ (function() { | ||
//======================================================================================================= | ||
// ASSERTS AND EXCEPTIONS | ||
//------------------------------------------------------------------------------------------------------- | ||
this.create_function({ | ||
name: prefix + 'raise', | ||
deterministic: true, | ||
varargs: false, | ||
call: function(message) { | ||
throw new Error(message); | ||
} | ||
}); | ||
//------------------------------------------------------------------------------------------------------- | ||
this.create_function({ | ||
name: prefix + 'raise_json', | ||
deterministic: true, | ||
varargs: false, | ||
call: function(facets_json) { | ||
var error, facets, k, ref, v; | ||
try { | ||
facets = JSON.parse(facets_json); | ||
} catch (error1) { | ||
error = error1; | ||
throw new Error(`not a valid argument for std_raise_json: ${rpr(facets)}`); | ||
} | ||
error = new Error((ref = facets.message) != null ? ref : "(no error message given)"); | ||
for (k in facets) { | ||
v = facets[k]; | ||
if (k === 'message') { | ||
continue; | ||
} | ||
error[k] = v; | ||
} | ||
throw error; | ||
} | ||
}); | ||
//------------------------------------------------------------------------------------------------------- | ||
this.create_function({ | ||
name: prefix + 'assert', | ||
deterministic: true, | ||
varargs: false, | ||
call: function(test, message) { | ||
if ((test == null) || (test === 0)) { | ||
throw new Error(message); | ||
} | ||
return test; | ||
} | ||
}); | ||
//======================================================================================================= | ||
// VARIABLES | ||
@@ -181,0 +228,0 @@ //------------------------------------------------------------------------------------------------------- |
@@ -71,2 +71,4 @@ (function() { | ||
// "@isa.boolean x.create_stdlib": ( x ) -> @isa.boolean x.create_stdlib | ||
//----------------------------------------------------------------------------------------------------------- | ||
@@ -73,0 +75,0 @@ this.declare('dbay_with_transaction_cfg', { |
{ | ||
"name": "dbay", | ||
"version": "10.118.0", | ||
"version": "10.119.0", | ||
"description": "In-Process, In-Memory & File-Based Relational Data Processing with SQLite, BetterSQLite3", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12000568
1824