I am dumping objects containing complete stacktraces and want the
resulting file in a human readable way. I already tried different
DumperOptions, but the resulting file keeps messed up.
For a small stacktrace it works perfect:
"note": ""
"stacktrace": |-
java.lang.ArrayIndexOutOfBoundsException: 3
at example.common.TestTry.execute(Testtry.java:17)
at example.common.TestTry.main(Testtry.java:11)
But for bigger ones it starts getting a mess:
"note": ""
"stacktrace": "Exception in thread \"AWT-EventQueue-0\"
java.lang.IllegalArgumentException:\
\ Stacktrace with name Yaml_ParseError already exists.\n\tat
de.tud.stacktraces.dataset.Dataset.save(Dataset.java:31)\n\
\tat
de.tud.stacktraces.collector.Collector.actionPerformed(Collector.java:
62)\n\
\tat javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
\n\tat javax.swing.AbstractButton$Handler.actionPerformed(Unknown\
\ Source)\n\tat
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)\n\
\tat javax.swing.DefaultButtonModel.setPressed(Unknown Source)\n
\tat javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown\
\ Source)\n\tat java.awt.Component.processMouseEvent(Unknown
Source)\n\tat javax.swing.JComponent.processMouseEvent(Unknown\
\ Source)\n\tat java.awt.Component.processEvent(Unknown Source)\n
\tat java.awt.Container.processEvent(Unknown\
\ Source)\n\tat java.awt.Component.dispatchEventImpl(Unknown
Source)\n\tat java.awt.Container.dispatchEventImpl(Unknown\
\ Source)\n\tat java.awt.Component.dispatchEvent(Unknown Source)\n
\tat java.awt.LightweightDispatcher.retargetMouseEvent(Unknown\
\ Source)\n\tat
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)\n\
\tat java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)\n
\tat java.awt.Container.dispatchEventImpl(Unknown\
\ Source)\n\tat java.awt.Window.dispatchEventImpl(Unknown Source)\n
\tat java.awt.Component.dispatchEvent(Unknown\
\ Source)\n\tat java.awt.EventQueue.dispatchEvent(Unknown Source)\n
\tat java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown\
\ Source)\n\tat
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)\n\
\tat java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)\n\tat\
\ java.awt.EventDispatchThread.pumpEvents(Unknown Source)\n\tat
java.awt.EventDispatchThread.pumpEvents(Unknown\
\ Source)\n\tat java.awt.EventDispatchThread.run(Unknown Source)"
Is there a way to have each line of the stacktrace dumped to one line
in the resulting file? I already set the width property of
DumperOptions to Integer.MAX_VALUE, but the result was that the
complete stacktrace gets dumped to one single line.
--
You received this message because you are subscribed to the Google Groups "SnakeYAML" group.
To post to this group, send email to
snakeya...@googlegroups.com.
To unsubscribe from this group, send email to
snakeyaml-cor...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/snakeyaml-core?hl=en.