Skip to content

Wrong error message when printing a block without name #13

@aveXcaesar

Description

@aveXcaesar

Expected Behavior

BxBlock without name can be printed with RebuildMedia.

Update (13.07.21):
The question is how to use this library:
In my opinion, you should not be able to create a BxBlock that cannot also be printed.
But it is possible to create a BxBlock as root element, which leads to the given exception.
The question arises whether the knowledge should be presupposed, how the Library is to be used, or whether a more intuitive use is wanted.

Actual Behavior

new BxBlock(new BxProp("test", "x")).Print(new RebuildMedia()); throws an exception:

System.ArgumentException: ''' is an invalid expanded name.'

Hint: #17 fixes not meaningful exception

Mention any other details that might be useful

The following is working:
new BxBlock("missingName", new BxProp("test", "x")).Print(new RebuildMedia());
results in:

<missingName bx-type="block">
  <test bx-type="prop">x</test>
</missingName>

Steps to reproduce the behavior

The log given by the failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions