Search in sources :

Example 11 with LimelightException

use of limelight.LimelightException in project limelight by slagyr.

the class Animation method update.

public void update() {
    makeupMissedUpdates();
    timer.markTime();
    try {
        doUpdate();
    } catch (Exception e) {
        stop();
        throw new LimelightException("Animation Cancelled", e);
    }
}
Also used : LimelightException(limelight.LimelightException) LimelightException(limelight.LimelightException)

Example 12 with LimelightException

use of limelight.LimelightException in project limelight by slagyr.

the class DirectoryZipper method zipTo.

public void zipTo(OutputStream output) {
    try {
        if (!fs.exists(directoryPath) && !fs.isDirectory(directoryPath))
            throw new LimelightException(directoryPath + " is not a valid directory");
        zipOutput = new ZipOutputStream(output);
        zipDirectory(directoryPath);
        zipOutput.finish();
        zipOutput.close();
    } catch (LimelightException e) {
        throw e;
    } catch (Exception e) {
        throw new LimelightException(e);
    }
}
Also used : ZipOutputStream(java.util.zip.ZipOutputStream) LimelightException(limelight.LimelightException) LimelightException(limelight.LimelightException)

Example 13 with LimelightException

use of limelight.LimelightException in project limelight by slagyr.

the class ClojureProduction method prepareToOpen.

@Override
protected void prepareToOpen() {
    try {
        Var newProduction = loadVar("limelight.clojure.production", "new-production");
        proxy = (ProductionProxy) newProduction.invoke(this);
    } catch (Exception e) {
        throw new LimelightException(e);
    }
}
Also used : LimelightException(limelight.LimelightException) LimelightException(limelight.LimelightException)

Example 14 with LimelightException

use of limelight.LimelightException in project limelight by slagyr.

the class TempTextAccessor method setText.

public void setText(String text, Prop panel) throws LimelightException {
    if (text == null || text.length() == 0)
        return;
    if (panel.getTextAccessor() != this)
        throw new LimelightException("You may only set text on empty props.");
    TextPanel textPanel = new TextPanel(panel);
    panel.add(textPanel);
    panel.sterilize();
    panel.setTextAccessor(textPanel);
    textPanel.setText(text, panel);
}
Also used : LimelightException(limelight.LimelightException)

Example 15 with LimelightException

use of limelight.LimelightException in project limelight by slagyr.

the class IoUtil method copyBytes.

public static void copyBytes(InputStream input, OutputStream output) {
    try {
        BufferedInputStream bufferedInput = new BufferedInputStream(input);
        StreamReader reader = new StreamReader(bufferedInput);
        BufferedOutputStream bufferedOutput = new BufferedOutputStream(output);
        while (!reader.isEof()) bufferedOutput.write(reader.readBytes(1000));
        bufferedOutput.flush();
    } catch (IOException e) {
        throw new LimelightException(e);
    }
}
Also used : LimelightException(limelight.LimelightException)

Aggregations

LimelightException (limelight.LimelightException)20 Test (org.junit.Test)2 InputStream (java.io.InputStream)1 OutputStream (java.io.OutputStream)1 Method (java.lang.reflect.Method)1 MalformedURLException (java.net.MalformedURLException)1 URL (java.net.URL)1 URLConnection (java.net.URLConnection)1 ZipOutputStream (java.util.zip.ZipOutputStream)1 FakePropProxy (limelight.model.api.FakePropProxy)1 RichStyle (limelight.styles.RichStyle)1 Style (limelight.styles.Style)1 AutoDimensionValue (limelight.styles.values.AutoDimensionValue)1 GreedyDimensionValue (limelight.styles.values.GreedyDimensionValue)1 MockStage (limelight.ui.model.MockStage)1 Box (limelight.util.Box)1