Examples of ShouldNeverHappenException


Examples of com.serotonin.ShouldNeverHappenException

                discreteTimeSeries = null;
                numericTimeSeries = null;
            }
            else
                throw new ShouldNeverHappenException("Unknown point data type: " + pointInfo.getDataType()
                        + " for point " + pointInfo.getReportPointId() + ", name=" + pointInfo.getExtendedName());

            if (exportCsvStreamer != null)
                exportCsvStreamer.startPoint(pointInfo);
        }
View Full Code Here

Examples of com.serotonin.ShouldNeverHappenException

                if (report.getSchedulePeriod() == ReportVO.SCHEDULE_CRON) {
                    try {
                        trigger = new CronTimerTrigger(report.getScheduleCron());
                    }
                    catch (ParseException e) {
                        throw new ShouldNeverHappenException(e);
                    }
                }
                else
                    trigger = Common.getCronTrigger(report.getSchedulePeriod(), report.getRunDelayMinutes() * 60);

 
View Full Code Here

Examples of com.serotonin.ShouldNeverHappenException

        ImplDefinition def = ImplDefinition.findByName(getImplementations(), name);
        try {
            return resolveClass(def).newInstance();
        }
        catch (Exception e) {
            throw new ShouldNeverHappenException("Error finding component with name '" + name + "': " + e.getMessage());
        }
    }
View Full Code Here

Examples of com.serotonin.ShouldNeverHappenException

    public ViewComponentState clone() {
        try {
            return (ViewComponentState) super.clone();
        }
        catch (CloneNotSupportedException e) {
            throw new ShouldNeverHappenException(e);
        }
    }
View Full Code Here

Examples of com.serotonin.ShouldNeverHappenException

    public JspComponentState clone() {
        try {
            return (JspComponentState) super.clone();
        }
        catch (CloneNotSupportedException e) {
            throw new ShouldNeverHappenException(e);
        }
    }
View Full Code Here

Examples of com.serotonin.ShouldNeverHappenException

                  break;
                case DataTypes.BINARY:
                  newValue = new PointValueTime(Boolean.parseBoolean(value), dt.getTime());
                  break;
                default:
                  throw new ShouldNeverHappenException("Uknown Data type for point");
                }
               
                if(!plVo.getHasTimestamp())
                  dp.updatePointValue(newValue);
                else
View Full Code Here

Examples of com.serotonin.ShouldNeverHappenException

    public WatchListState clone() {
        try {
            return (WatchListState) super.clone();
        }
        catch (CloneNotSupportedException e) {
            throw new ShouldNeverHappenException(e);
        }
    }
View Full Code Here

Examples of com.serotonin.ShouldNeverHappenException

      case DataTypes.BINARY:
        boolean bool  = b.getBoolean();
        dataValue = new BinaryValue(bool);
        break;
      case DataTypes.IMAGE:
        throw new ShouldNeverHappenException("Images are not supported");
      case DataTypes.MULTISTATE:
        int i  = b.getInt();
        dataValue = new MultistateValue(i);
        break;
      case DataTypes.NUMERIC:
        double d  = b.getDouble();
        dataValue = new NumericValue(d);
        break;
      default:
        throw new ShouldNeverHappenException("Data type of " + dataType + " is not supported");
    }
   
    //Get the annotation
    String annotation = b.getString();
   
 
    if(annotation != null){
      try{
        return new AnnotatedPointValueTime(dataValue, ts, TranslatableMessage.deserialize(annotation));
      }catch(Exception e){
        throw new ShouldNeverHappenException(e);
      }
    }else{
      return new PointValueTime(dataValue, ts);
    }
  }
View Full Code Here

Examples of com.serotonin.ShouldNeverHappenException

        break;
      case DataTypes.BINARY:
        b.putBoolean(value.getBooleanValue());
        break;
      case DataTypes.IMAGE:
        throw new ShouldNeverHappenException("Images are not supported");
      case DataTypes.MULTISTATE:
        b.putInt(value.getIntegerValue());
        break;
      case DataTypes.NUMERIC:
        b.putDouble(value.getDoubleValue());
        break;
      default:
        throw new ShouldNeverHappenException("Data type of " + value.getValue().getDataType() + " is not supported");

    }
   
    //Put in annotation
    if(value.isAnnotated()){
View Full Code Here

Examples of com.serotonin.ShouldNeverHappenException

        try {
            template = Common.freemarkerConfiguration.getTemplate(reportInstance.getTemplateFile());
        }
        catch (IOException e) {
            // Couldn't load the template?
            throw new ShouldNeverHappenException(e);
        }

        // Create the content from the template.
        StringWriter writer = new StringWriter();
        try {
            template.process(model, writer);
        }
        catch (Exception e) {
            // Couldn't process the template?
            throw new ShouldNeverHappenException(e);
        }

        // Save the content
        html = writer.toString();
        subject = subjectDirective.getSubject();
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.