Examples of UnexpectedException


Examples of com.jdroid.java.exception.UnexpectedException

      // all the values will be quoted
      CSVWriter csvWriter = new CSVWriter(writer);
      csvWriter.writeNext(values.toArray(new String[] {}));
      csvWriter.close();
    } catch (IOException exception) {
      throw new UnexpectedException("Error writing the values", exception);
    }
  }
View Full Code Here

Examples of com.jdroid.java.exception.UnexpectedException

      String fileName = "csv_file" + DateUtils.now().getTime();
      File file = File.createTempFile(fileName, ".csv");
      CSVUtils.writeMultipleColumnCSV(new FileOutputStream(file), values);
      return file;
    } catch (IOException exception) {
      throw new UnexpectedException("Error creating a temporal file to write the csv values", exception);
    }
  }
View Full Code Here

Examples of com.jdroid.java.exception.UnexpectedException

    try {
      CSVWriter csvWriter = new CSVWriter(writer, CSVWriter.DEFAULT_SEPARATOR, CSVWriter.NO_QUOTE_CHARACTER);
      csvWriter.writeAll(values);
      csvWriter.close();
    } catch (IOException exception) {
      throw new UnexpectedException("Error writing the values", exception);
    }
  }
View Full Code Here

Examples of com.jdroid.java.exception.UnexpectedException

   * @param endDate Date range's end date.
   */
  public DateRange(Date startDate, Date endDate) {
   
    if ((startDate != null) && (endDate != null) && DateUtils.isAfter(startDate, endDate)) {
      throw new UnexpectedException("The end date must be after start date.");
    }
    this.startDate = startDate;
    this.endDate = endDate;
  }
View Full Code Here

Examples of com.jdroid.java.exception.UnexpectedException

      return (T)PropertyUtils.getNestedProperty(from, propertyName);
    } catch (NestedNullException exception) {
      // if any the nested objects is null we return null as value
      return null;
    } catch (Exception ex) {
      throw new UnexpectedException("Error getting the property: '" + propertyName + "' of: " + from);
    }
  }
View Full Code Here

Examples of com.softwarementors.extjs.djn.UnexpectedException

        responses.add(getGson().toJson(response));
      }
      return responses;
    }
    catch (ExecutionException e) {
      UnexpectedException ex = UnexpectedException.forExecutionExceptionShouldNotHappenBecauseProcessorHandlesExceptionsAsServerErrorResponses(e);
      logger.error( ex.getMessage(), ex );
      throw ex;
    }
  }
View Full Code Here

Examples of java.rmi.UnexpectedException

    for (Class<?> declaredType : method.getExceptionTypes()) {
        if (declaredType.isAssignableFrom(thrownType)) {
      throw e;
        }
    }
    e = new UnexpectedException("unexpected exception", e);
      }
      throw e;
  }
    }
View Full Code Here

Examples of java.rmi.UnexpectedException

  void clearSnapshot(final SortedSet<KeyValue> ss)
  throws UnexpectedException {
    this.lock.writeLock().lock();
    try {
      if (this.snapshot != ss) {
        throw new UnexpectedException("Current snapshot is " +
          this.snapshot + ", was passed " + ss);
      }
      // OK. Passed in snapshot is same as current snapshot.  If not-empty,
      // create a new snapshot and let the old one go.
      if (!ss.isEmpty()) {
View Full Code Here

Examples of java.rmi.UnexpectedException

  void clearSnapshot(final SortedSet<KeyValue> ss)
  throws UnexpectedException {
    this.lock.writeLock().lock();
    try {
      if (this.snapshot != ss) {
        throw new UnexpectedException("Current snapshot is " +
          this.snapshot + ", was passed " + ss);
      }
      // OK. Passed in snapshot is same as current snapshot.  If not-empty,
      // create a new snapshot and let the old one go.
      if (!ss.isEmpty()) {
View Full Code Here

Examples of java.rmi.UnexpectedException

        }
        catch (UnexpectedPropertySetTypeException ex)
        {
            /* This exception will never be throws because we already checked
             * explicitly for this case above. */
            throw new UnexpectedException(ex.toString());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.