We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17c4d42 commit ecf1812Copy full SHA for ecf1812
src/main/java/ru/mystamps/web/service/ImageService.java
@@ -27,6 +27,8 @@
27
import org.springframework.transaction.annotation.Transactional;
28
import org.springframework.web.multipart.MultipartFile;
29
30
+import com.google.common.base.Throwables;
31
+
32
import static com.google.common.base.Preconditions.checkArgument;
33
import static com.google.common.base.Preconditions.checkState;
34
@@ -61,7 +63,7 @@ String save(final MultipartFile file) {
61
63
image.setImage(file.getBytes());
62
64
} catch (final IOException e) {
65
// throw RuntimeException for rolling back transaction
- throw new RuntimeException(e);
66
+ throw Throwables.propagate(e);
67
}
68
69
final Image entity = imageDao.save(image);
0 commit comments