exupery-core-internals 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ export declare class Error<Type> {
2
+ type: Type;
3
+ constructor(type: Type);
4
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Error = void 0;
4
+ class Error {
5
+ constructor(type) {
6
+ this.type = type;
7
+ this.type = type;
8
+ }
9
+ }
10
+ exports.Error = Error;
@@ -1,4 +1,4 @@
1
- export declare function panic_for_internal_functions(depth: number, message: string): never;
1
+ export declare function panic_for_internal_functions(depth: number, ...message: string[]): never;
2
2
  /**
3
3
  * call this function if an error is en encountered that is unrecoverable
4
4
  * and the application should terminate immediately
@@ -7,4 +7,4 @@ export declare function panic_for_internal_functions(depth: number, message: str
7
7
  *
8
8
  * @param message message to be printed on stderr
9
9
  */
10
- export declare function panic(message: string): never;
10
+ export declare function panic(...message: string[]): never;
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.panic_for_internal_functions = panic_for_internal_functions;
4
4
  exports.panic = panic;
5
5
  const get_location_info_1 = require("./get_location_info");
6
- function panic_for_internal_functions(depth, message) {
6
+ function panic_for_internal_functions(depth, ...message) {
7
7
  const location = (0, get_location_info_1.get_location_info)(depth + 1);
8
- console.error(`PANIC: ${message} @ ${(0, get_location_info_1.location_to_string)(location)}`);
8
+ console.error(`PANIC: ${message.join(" ")} @ ${(0, get_location_info_1.location_to_string)(location)}`);
9
9
  const e = new Error();
10
10
  console.error(e.stack);
11
11
  process.exit(1);
@@ -18,6 +18,6 @@ function panic_for_internal_functions(depth, message) {
18
18
  *
19
19
  * @param message message to be printed on stderr
20
20
  */
21
- function panic(message) {
22
- panic_for_internal_functions(1, message);
21
+ function panic(...message) {
22
+ panic_for_internal_functions(1, ...message);
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exupery-core-internals",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "license": "ISC",
5
5
  "description": "",
6
6
  "author": "Corno",