pml-lang / pml-companion

Java source code of the 'PML Companion (PMLC)'
https://www.pml-lang.dev
GNU General Public License v2.0
22 stars 1 forks source link

Fatal Conversion Error: [text Inside [title #81

Closed tajmone closed 2 years ago

tajmone commented 2 years ago

While experimenting nodes-nesting with PML 2.3.0 I came across a fatal error when a [text node is nested within a [title node.

Trying to convert the following source document:

[doc [title Error Sample]
  [ch [title Title With [text Text] Node ]]
]

results in the following error:

THE FOLLOWING APPLICATION ERROR OCCURRED (2022-07-27T04:36:09.8544301):
Should never be called
See file 'D:\some_path\errors.log' for more information.

[Finished in 1.2s]
Click here to view the contents of the `errors.log` file... ``` THE FOLLOWING APPLICATION ERROR OCCURRED (2022-07-27T04:36:09.8544301): Error : Should never be called Location : Factory PML_text_node_creator.create_node (dev.pml.converter.tree_creator.node_creator.creators.inline_n ode.text) line 9 Time : 2022-07-27 04:36:09 Info : Should never be called Trace: > Factory PML_text_node_creator.create_node, line 9 (dev.pml.converter.tree_creator.node_creator.creators.inline_node.text) > Factory PML_tree_creator.create_inline_child_nodes, line 412 (dev.pml.converter.tree_creator) > Factory PML_tree_creator.create_node_creator_context, line 92 (dev.pml.converter.tree_creator) > Factory PML_tree_creator.create_block_child_nodes, line 257 (dev.pml.converter.tree_creator) > Factory PML_tree_creator.create_node_creator_context, line 97 (dev.pml.converter.tree_creator) > Factory PML_tree_creator.create_block_child_nodes, line 257 (dev.pml.converter.tree_creator) > Factory PML_tree_creator.create_node_creator_context, line 97 (dev.pml.converter.tree_creator) > Factory PML_tree_creator.try_create_tree_2, line 56 (dev.pml.converter.tree_creator) > Factory PML_tree_creator.try_create_tree, line 17 (dev.pml.converter.tree_creator) > Service PML_to_HTML_Converter.try_create_HTML_file, line 106 (dev.pml.converter) > Service PML_to_HTML_Converter.try_convert, line 29 (dev.pml.converter) > Service PML_convert_command.execute, line 210 (dev.pml.converter.PAIOM_commands) > Service PML_convert_command.execute, line 165 (dev.pml.converter.PAIOM_commands) > Factory single_command_executor.execute_command, line 11 (org.ppl.paiom.config.execution.single_command_executor) > Service execute_command_meta_command.execute_command, line 102 (org.ppl.paiom.meta_commands.commands.execute_command) > Factory paiom.execute_meta_command, line 156 (org.ppl.paiom) > Factory paiom.execute_command_from_string_data_2, line 87 (org.ppl.paiom) > Factory paiom.execute_command_from_string_data, line 43 (org.ppl.paiom) > Factory paiom.execute_command_from_command_line_arguments, line 14 (org.ppl.paiom) > Service PAIOM_command_executor.execute_command_line_arguments, line 18 (org.ppl.paiom) > Service PAIOM_command_executor.execute_command_line_arguments_2, line 35 (org.ppl.paiom) > Service PAIOM_command_executor.execute_command_line_arguments_3, line 60 (org.ppl.paiom) > Service CLI_start.execute_command_line_arguments, line 72 (dev.pml.converter) > Service CLI_start.start, line 34 (dev.pml.converter) > Service start.start, line 10 (dev.pml.converter) ```

I wanted to verify which kind of nodes can be used within a [title, so I tried nesting various block nodes to see which errors they would produce.

So far, it seems that only the [text node results in PMLC failure, all the other block nodes I've tried failed with a meaningful error message, and even non-existing node (e.g. [xyz fail gracefully), so it seems to be a problem specific to [text nodes.

pml-lang commented 2 years ago

a fatal error when a [text node is nested within a [title node

Yes, this was a known error in version 2.3.0. It's already fixed in the upcoming version 3.0.0.

pml-lang commented 2 years ago

Fixed in version 3.0.0.