package votorola.g; // Copyright 2007-2008, 2011, Michael Allan. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Votorola Software"), to deal in the Votorola Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Votorola Software, and to permit persons to whom the Votorola Software is furnished to do so, subject to the following conditions: The preceding copyright notice and this permission notice shall be included in all copies or substantial portions of the Votorola Software. THE VOTOROLA SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE VOTOROLA SOFTWARE OR THE USE OR OTHER DEALINGS IN THE VOTOROLA SOFTWARE. import votorola.g.lang.*; /** Utilities for project Votorola. */ public @ThreadSafe class Votorola { private Votorola() {} // public static final String dd = "mike@zelea.com"; // TEST debug /** The release version of this code, in the form "N.N.N[.N]", where N is a number. * Wide releases are usually triples "N.N.N". The optional fourth number is for * narrow releases, mostly internal. */ public static final String VERSION = "0.2.3.1"; /* DO NOT EDIT VERSION begin votorola::b::AutoEditor_Script require votorola::b::Release; votorola::b::Release::auto_edit_version(); end votorola::b::AutoEditor_Script */ /** Returns any details of the throwable t that are known to be informative, but are * not part of its standard t.toString(). * * @return unmessaged details as " (DETAILS)", or "" if there are none. */ public static String unmessagedDetails( Throwable t ) { if( t instanceof java.sql.SQLException ) // cf. votorola.g.sql.logAndClearWarnings. Unfort. not all SQLExceptions are recorded as warnings by the connection, or a call to logAndClearWarnings would be all that's needed. { // FIX does not t.getMessage() give these details? String state = ((java.sql.SQLException)t).getSQLState(); // PostgreSQL's warning/exception message strings do not include this, so include it here if( state != null ) return " (SQLState=" + state + ")"; } if( t instanceof java.text.ParseException ) { // FIX does not t.getMessage() give these details? return " (errorOffset=" + ((java.text.ParseException)t).getErrorOffset() + ")"; } return ""; } // ` n o n - a p i ```````````````````````````````````````````````````````````````````` /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean AZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean BZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean CZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean DZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean EZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean FZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean GZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean HZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean IZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean JZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean KZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean LZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean MZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean NZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean OZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean PZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean QZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean RZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean SZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean TZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean UZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean VZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean WZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean XZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean YZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean ZZZ_DUMMY = false; /** A dummy declaration to ensure stable, referenceable page numbering in the javadoc index. */ public static @Warning("non-API") final boolean _ZZ_DUMMY = false; }