Code example for SynchronousQueue

Methods: take

0
    } 
 
    private static void checkError(String message) throws Exception {
 
        // Wait for the server to set the error field. 
        final Exception x = queue.take();
 
        if (x == Result.SUCCESS) {
            return; 
        } 
 
 
        // case of 6674166: this is very unlikely to happen, even if 
        //     both 6674166 and 6774170 aren't fixed. If it happens 
        //     however, it might indicate that neither defects are fixed. 
 
        if (x instanceof NullPointerException) {
            throw new Exception(message + " - " +
                    "Congratulations! it seems you have triggered 6674166. " + 
                    "Neither 6674166 nor 6774170 seem to be fixed: " + x, x);
        } else if (x instanceof IOException) {