v0.2.2b: changed how interlevelscene deals with exceptions
This commit is contained in:
@@ -34,6 +34,7 @@ import com.watabou.noosa.audio.Music;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class InterlevelScene extends PixelScene {
|
||||
@@ -187,7 +188,7 @@ public class InterlevelScene extends PixelScene {
|
||||
|
||||
error = ERR_FILE_NOT_FOUND;
|
||||
|
||||
} catch (Exception e ) {
|
||||
} catch (IOException e ) {
|
||||
|
||||
error = ERR_GENERIC;
|
||||
|
||||
@@ -247,7 +248,7 @@ public class InterlevelScene extends PixelScene {
|
||||
}
|
||||
}
|
||||
|
||||
private void descend() throws Exception {
|
||||
private void descend() throws IOException {
|
||||
|
||||
Level level;
|
||||
ArrayList<Item> fallingItems = new ArrayList<Item>();
|
||||
@@ -290,7 +291,7 @@ public class InterlevelScene extends PixelScene {
|
||||
|
||||
}
|
||||
|
||||
private void fall() throws Exception {
|
||||
private void fall() throws IOException {
|
||||
|
||||
Level level = Dungeon.level;
|
||||
|
||||
@@ -321,7 +322,7 @@ public class InterlevelScene extends PixelScene {
|
||||
Dungeon.switchLevel( level, fallIntoPit ? level.pitCell() : level.randomRespawnCell() );
|
||||
}
|
||||
|
||||
private void ascend() throws Exception {
|
||||
private void ascend() throws IOException {
|
||||
Actor.fixTime();
|
||||
|
||||
Dungeon.saveLevel();
|
||||
@@ -330,7 +331,7 @@ public class InterlevelScene extends PixelScene {
|
||||
Dungeon.switchLevel( level, level.exit );
|
||||
}
|
||||
|
||||
private void returnTo() throws Exception {
|
||||
private void returnTo() throws IOException {
|
||||
|
||||
Actor.fixTime();
|
||||
|
||||
@@ -340,7 +341,7 @@ public class InterlevelScene extends PixelScene {
|
||||
Dungeon.switchLevel( level, Level.resizingNeeded ? level.adjustPos( returnPos ) : returnPos );
|
||||
}
|
||||
|
||||
private void restore() throws Exception {
|
||||
private void restore() throws IOException {
|
||||
|
||||
Actor.fixTime();
|
||||
|
||||
@@ -354,7 +355,7 @@ public class InterlevelScene extends PixelScene {
|
||||
}
|
||||
}
|
||||
|
||||
private void resurrect() throws Exception {
|
||||
private void resurrect() throws IOException {
|
||||
|
||||
Actor.fixTime();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user