VMware Cloud Community
JohnRocha
Enthusiast
Enthusiast

How do I generate an error/abort that has blank lines or newlines in it?

Hello,

I have abort text that is difficult to read because all of the information is crammed together. There is no white space break. I would like to add blank lines (newlines) in the text to make it easier to read.

For example:

<throwError
    text="Line 1
Line 2
Line 3"

Generates a dialog such as:

There has been an error.
Line 1
Line 2
Line 3

I would like to add a blank line between the lines. I want to see it as:

There has been an error.
Line 1

Line 2

Line 3

I've tried using '&#xB;' and '&lt;br&gt;' (<br>) but that just prints the string \n or <br>.

Labels (1)
0 Kudos
1 Reply
JohnRocha
Enthusiast
Enthusiast

I found a workaround for this issue.

Use the specific XML tags instead of using quoted inline settings.

For example, the following will work:

<throwError>
    <text>
Line 1

Line 2

Line 3
    </text>
</throwError>

 

I see this more as an error report now. That newlines are not correctly preserved when using the inline variable="value" setting.

0 Kudos