Coverage Report - com.sun.javafx.runtime.ErrorHandler
 
Classes in this File Line Coverage Branch Coverage Complexity
ErrorHandler
22%
4/18
25%
1/4
0
 
 1  
 package com.sun.javafx.runtime;
 2  
 
 3  
 import com.sun.javafx.runtime.sequence.Sequence;
 4  
 
 5  
 /**
 6  
  * ErrorHandler
 7  
  *
 8  
  * @author Brian Goetz
 9  
  */
 10  0
 public class ErrorHandler {
 11  
     
 12  
     private static boolean getBoolean(String property) {
 13  
         try {
 14  1
             return Boolean.getBoolean(property);
 15  0
         } catch (SecurityException ignored) {
 16  0
             return false;
 17  
         }
 18  
     }
 19  
     
 20  1
     private final static boolean debug = getBoolean("javafx.debug");
 21  
 
 22  
     public static boolean isDebug() {
 23  0
         return debug;
 24  
     }
 25  
 
 26  
     /** Called when attempting to insert an element into a sequence at an out-of-bounds location */
 27  
     public static<T> void outOfBoundsInsert(Sequence<T> seq, int index, T value) {
 28  
 
 29  0
     }
 30  
 
 31  
     /** Called when attempting to replace an element of a sequence at an out-of-bounds location */
 32  
     public static<T> void outOfBoundsReplace(Sequence<T> seq, int index, T value) {
 33  
 
 34  0
     }
 35  
 
 36  
     /** Called when attempting to delete an element of a sequence at an out-of-bounds location */
 37  
     public static<T> void outOfBoundsDelete(Sequence<T> seq, int index) {
 38  
 
 39  0
     }
 40  
 
 41  
     /** Called when attempting to read an element of a sequence at an out-of-bounds location */
 42  
     public static<T> void outOfBoundsRead(Sequence<T> seq, int index) {
 43  
 
 44  0
     }
 45  
 
 46  
     /** Called when attempting to dereference a null value */
 47  
     public static void nullDereference() {
 48  
 
 49  0
     }
 50  
 
 51  
     public static void bindException(RuntimeException e) {
 52  2
         if (debug)
 53  0
             e.printStackTrace(System.err);
 54  2
     }
 55  
 
 56  
     /** Called when attempting to coerce a null numeric or boolean value to a primitive */
 57  
     public static void nullToPrimitiveCoercion(String type) {
 58  0
         if (isDebug())
 59  0
             System.err.println("Coercing " + type + " to null");
 60  
 
 61  0
     }
 62  
 
 63  
     /** Called when attempting to write a null value to a non-nullable variable */
 64  
     public static void invalidNullWrite() {
 65  
 
 66  0
     }
 67  
 }