diff --git a/demo/XidDemo.java b/demo/XidDemo.java
index ab72782..c514389 100644
--- a/demo/XidDemo.java
+++ b/demo/XidDemo.java
@@ -31,8 +31,6 @@ class XidDemo
//
Data datas;
- IdData tag;
-
diff --git a/test/XidTest.java b/test/XidTest.java
index 18361e8..d005008 100644
--- a/test/XidTest.java
+++ b/test/XidTest.java
@@ -60,15 +60,20 @@ class XidTest
String htmlSource;
StringBuffer html;
- StringBuffer errorMessage;
// Populate attributes of Test 03.
System.out.println ("----------------------------");
datas = new Data ();
datas.setContent ("name", "Superman");
- errorMessage = new StringBuffer ();
-
- html = StringPresenter.doXid ("
a name
", datas, errorMessage);
+ try
+ {
+ html = StringPresenter.doXid ("a name
", datas);
+ }
+ catch (Exception exception)
+ {
+ System.out.println(exception.getMessage());
+ html = null;
+ }
System.out.println (check ("only content change", html, "Superman
"));
@@ -81,8 +86,15 @@ class XidTest
datas.appendAttribute ("lastname", "style", "foreground: red;");
datas.setAttribute ("lastname", "class", "nameClass");
- errorMessage = new StringBuffer ();
- html = StringPresenter.doXid ("a last name
", datas, errorMessage);
+ try
+ {
+ html = StringPresenter.doXid ("a last name
", datas);
+ }
+ catch (Exception exception)
+ {
+ System.out.println(exception.getMessage());
+ html = null;
+ }
System.out.println (check ("content and attributes", html, "Spiderman
"));
// Populate attributes of Test 03.
@@ -95,9 +107,15 @@ class XidTest
datas.setContent ("words", 4, "echo");
datas.setContent ("words", 5, "fox");
-
- errorMessage = new StringBuffer ();
- html = StringPresenter.doXid ("", datas, errorMessage);
+ try
+ {
+ html = StringPresenter.doXid ("", datas);
+ }
+ catch (Exception exception)
+ {
+ System.out.println(exception.getMessage());
+ html = null;
+ }
System.out.println (check ("list assertion 1", html, "alpha"));
System.out.println (check ("list assertion 2", html, "bravo"));
@@ -116,14 +134,20 @@ class XidTest
datas.setContent ("identity", 2, "nom", "Tronche");
datas.setContent ("identity", 2, "prenom", "Christophe");
-
- errorMessage = new StringBuffer ();
StringBuffer source = new StringBuffer ();
source.append ("\n");
source.append (" noid | un nom | un prenom |
\n");
source.append ("
");
htmlSource = source.toString ();
- html = StringPresenter.doXid (htmlSource, datas, errorMessage);
+ try
+ {
+ html = StringPresenter.doXid (htmlSource, datas);
+ }
+ catch (Exception exception)
+ {
+ System.out.println(exception.getMessage());
+ html = null;
+ }
System.out.println (check ("table 1 assertion 1", html, "noid | Jemba | Epo |
"));
System.out.println (check ("table 1 assertion 2", html, "noid | Momon | Christian |
"));