sav.z
Class Warning

java.lang.Object
  extended bysav.z.Warning
Direct Known Subclasses:
Error, Failure

public abstract class Warning
extends java.lang.Object

An object that provides information if Session process, analysis/execution, completes with Warnings: Errors or Failures. The example prints Warnings.

  String text;
  Session ss;
  ...
  ss.z(text);
  ss.closeBases();
  if (ss.hasWarnings()) {
    Warning w[] = ss.warnings();
    for (int i = 0; i < w.length; ++i)
      System.out.println(w[i]);
  }
 

See Also:
Session.warnings(), Statement.warnings()

Constructor Summary
Warning()
           
 
Method Summary
 java.lang.String message()
          Returns a string explanation of Warning.
 java.lang.String name()
          Returns name of exception or type name, ERROR/FAILURE
 int position()
          Returns begin of warning Statement expression in a Script text.
 java.lang.String toString()
          Returns String of a Warning object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Warning

public Warning()
Method Detail

toString

public java.lang.String toString()
Returns String of a Warning object. String has view:
 name [:[data file][, data position]]
 [:([line][, position])] [:message]
 
where
name - name of exception or name of Warning type ERROR/FAILURE
data file - file name, if warning Statement is in a read/written out table data
data position - begin of a warning Statement expression in a data (file or "<...>" Script text)
line - line number of warning Statement in a Script text
position - begin of a warning Statement expression in a Script text
message - string explanation of Warning


name

public java.lang.String name()
Returns name of exception or type name, ERROR/FAILURE


position

public int position()
Returns begin of warning Statement expression in a Script text.


message

public java.lang.String message()
Returns a string explanation of Warning.