Add missing dependencies of Error
diff --git a/gen/src/write.rs b/gen/src/write.rs
index 68d8775..8cc1b1b 100644
--- a/gen/src/write.rs
+++ b/gen/src/write.rs
@@ -214,6 +214,8 @@
             Api::RustFunction(efn) if !out.header => {
                 if efn.throws {
                     out.include.exception = true;
+                    out.include.string = true;
+                    needs_rust_str = true;
                     needs_rust_error = true;
                 }
                 for arg in &efn.args {