@abaplint/runtime 2.12.27 → 2.12.29
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.
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { Context } from "../context";
|
|
2
|
-
import { ABAPObject } from "../types";
|
|
2
|
+
import { ABAPObject, String } from "../types";
|
|
3
3
|
import { ICharacter } from "../types/_character";
|
|
4
4
|
export interface IMessageOptions {
|
|
5
5
|
id?: ICharacter | string;
|
|
6
6
|
number?: ICharacter | string;
|
|
7
7
|
type?: ICharacter | string;
|
|
8
8
|
displayLike?: ICharacter | string;
|
|
9
|
-
|
|
9
|
+
exceptionOrText?: ABAPObject | ICharacter | String;
|
|
10
10
|
with?: (ICharacter | string)[];
|
|
11
11
|
into?: ICharacter;
|
|
12
|
-
text?: ICharacter;
|
|
13
12
|
}
|
|
14
13
|
export declare class MessageStatement {
|
|
15
14
|
private readonly context;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MessageStatement = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
4
5
|
function replace(text, w) {
|
|
5
6
|
for (let i = 0; i < 6; i++) {
|
|
6
7
|
const search = "&" + (i + 1);
|
|
@@ -72,11 +73,13 @@ class MessageStatement {
|
|
|
72
73
|
abap.builtin.sy.get().msgno.set(msgnr || "");
|
|
73
74
|
abap.builtin.sy.get().msgty.set(msgty);
|
|
74
75
|
let replaced = "";
|
|
75
|
-
if (options.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
if (options.exceptionOrText) {
|
|
77
|
+
if (options.exceptionOrText instanceof types_1.ABAPObject) {
|
|
78
|
+
replaced = await options.exceptionOrText.get().if_message$get_text();
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
replaced = options.exceptionOrText.get();
|
|
82
|
+
}
|
|
80
83
|
}
|
|
81
84
|
else {
|
|
82
85
|
const text = await findText(this.context, arbgb, msgnr, msgty);
|