[core] Throw exceptions by value
This commit is contained in:
@@ -6,7 +6,7 @@ namespace {
|
||||
|
||||
// Dummy initializer (We don't support initializing this from the JVM)
|
||||
std::unique_ptr<mbgl::android::UnknownLayer> init(jni::JNIEnv&) {
|
||||
throw new std::runtime_error("UnknownLayer should not be initialized from the JVM");
|
||||
throw std::runtime_error("UnknownLayer should not be initialized from the JVM");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace {
|
||||
|
||||
// Dummy initializer (We don't support initializing this from the JVM)
|
||||
std::unique_ptr<mbgl::android::UnknownSource> init(jni::JNIEnv&) {
|
||||
throw new std::runtime_error("UnknownSource should not be initialized from the JVM");
|
||||
throw std::runtime_error("UnknownSource should not be initialized from the JVM");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -341,7 +341,7 @@ Framebuffer
|
||||
Context::createFramebuffer(const Renderbuffer<RenderbufferType::RGBA>& color,
|
||||
const Renderbuffer<RenderbufferType::DepthStencil>& depthStencil) {
|
||||
if (color.size != depthStencil.size) {
|
||||
throw new std::runtime_error("Renderbuffer size mismatch");
|
||||
throw std::runtime_error("Renderbuffer size mismatch");
|
||||
}
|
||||
auto fbo = createFramebuffer();
|
||||
bindFramebuffer = fbo;
|
||||
@@ -365,7 +365,7 @@ Framebuffer
|
||||
Context::createFramebuffer(const Texture& color,
|
||||
const Renderbuffer<RenderbufferType::DepthStencil>& depthStencil) {
|
||||
if (color.size != depthStencil.size) {
|
||||
throw new std::runtime_error("Renderbuffer size mismatch");
|
||||
throw std::runtime_error("Renderbuffer size mismatch");
|
||||
}
|
||||
auto fbo = createFramebuffer();
|
||||
bindFramebuffer = fbo;
|
||||
|
||||
Reference in New Issue
Block a user