Commit 52862173 by sikang

Bug修复

parent 90bfd08e
......@@ -24,6 +24,7 @@ import tech.starwin.base.BaseActivity;
import tech.starwin.impl.OnEventClickListener;
import tech.starwin.utils.BitmapUtils;
import tech.starwin.utils.FileUtils;
import tech.starwin.utils.collection.UploadManager;
import tech.starwin.utils.context_utils.ActivityJumper;
import tech.starwin.utils.context_utils.EasyActivityResult;
import tech.starwin.utils.ui_utils.UIHelper;
......@@ -131,7 +132,11 @@ public class TakePhotoActivity extends BaseActivity {
@Override
protected void onStart() {
super.onStart();
cameraView.start();
try {
cameraView.start();
}catch (Exception e){
UploadManager.uploadException(e,"camera start exception");
}
}
@Override
......@@ -142,7 +147,13 @@ public class TakePhotoActivity extends BaseActivity {
@Override
protected void onStop() {
super.onStop();
cameraView.stop();
try {
cameraView.stop();
}catch (Exception e){
UploadManager.uploadException(e,"camera stop exception");
}
}
@Override
......
......@@ -150,11 +150,10 @@ public class UploadManager {
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException(e.getMessage());
uploadException(e, e.getMessage());
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e.getMessage());
uploadException(e, e.getMessage());
} finally {
try {
os.close();
......@@ -312,7 +311,7 @@ public class UploadManager {
sendControlCommand(os, "CLOSE", sessionId, "exception upload completed");
} catch (Exception e) {
throw new RuntimeException(e);
uploadException(e,e.getMessage());
} finally {
try {
if (os != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment