production errors
This commit is contained in:
@@ -251,7 +251,7 @@ class MainActivity : AppCompatActivity() {
|
||||
|
||||
|
||||
|
||||
try {
|
||||
|
||||
fusedLocationClient.lastLocation.addOnSuccessListener { location: Location? ->
|
||||
location?.let {
|
||||
DataHolder.selectedTest!!.location =
|
||||
@@ -270,15 +270,7 @@ class MainActivity : AppCompatActivity() {
|
||||
val rootView = findViewById<View>(android.R.id.content)
|
||||
Snackbar.make(rootView, errorMessage, Snackbar.LENGTH_LONG).show()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
// Handle the exception here
|
||||
e.printStackTrace()
|
||||
FirebaseCrashlytics.getInstance().recordException(e)
|
||||
// Display an error message to the user using a Snackbar
|
||||
val errorMessage = "An error occurred: ${e.message}"
|
||||
val rootView = findViewById<View>(android.R.id.content)
|
||||
Snackbar.make(rootView, errorMessage, Snackbar.LENGTH_LONG).show()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user