Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How can I check the value of wtf_is_fatal?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Shri  
View profile  
 More options Aug 10 2012, 2:13 pm
From: Shri <shri.bo...@gmail.com>
Date: Fri, 10 Aug 2012 11:13:28 -0700 (PDT)
Local: Fri, Aug 10 2012 2:13 pm
Subject: How can I check the value of wtf_is_fatal?

I want to check if Log.wtf will result in program termination. I want to
use that property to enable expensive asserts in my program. How can I
check for this? I used the following code but it throws
SettingNotFoundException.

  int wtfIsFatal =
android.provider.Settings.Secure.getInt(getContentResolver(),
"wtf_is_fatal");

I tried adding android.permission.WRITE_SECURE_SETTINGS to my
AndroidManifest.xml but that does not help. I had set wtf_is_fatal as such:

adb root
adb shell
sqlite3 /data/data/com.android.providers.settings/databases/settings.db

>> insert into secure (name, value) values ('wtf_is_fatal', 1);
>> select * from secure;

...
60|wtf_is_fatal|1
...

Thanks,
Shri


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dianne Hackborn  
View profile  
 More options Aug 10 2012, 2:32 pm
From: Dianne Hackborn <hack...@android.com>
Date: Fri, 10 Aug 2012 11:32:21 -0700
Local: Fri, Aug 10 2012 2:32 pm
Subject: Re: [android-developers] How can I check the value of wtf_is_fatal?

Why do you want to do this?  If you want to log an error that doesn't cause
your app to crash, use Log.w().  I generally recommend if you have a fatal
error, using Log.e() (though it is your responsibility to crash or whatever
the fatal error behavior is after that).

If you don't want the behavior of Log.wtf() (which is partly that it can
optional crash your app based on the setting), then don't use it.  The only
reason to use it that I can think of is because you want the behavior it
provides.  Is there some other reason you want to call that specific method?

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shri Borde  
View profile  
 More options Aug 10 2012, 2:50 pm
From: Shri Borde <shri.bo...@gmail.com>
Date: Fri, 10 Aug 2012 11:50:09 -0700
Local: Fri, Aug 10 2012 2:50 pm
Subject: Re: [android-developers] How can I check the value of wtf_is_fatal?

I want to use wtf_is_fatal==1 as the gate for my expensive asserts since
the people who will set wtf_is_fatal (the dev team) will also be ok with
the slight slowdown caused by expensive asserts. Strictly speaking, these
should be two independent settings, but I was hoping to piggyback off of
wtf_is_fatal==1 so the devs do not have to worry about setting two
different bits. If I can not access wtf_is_fatal, I will probably add a
separate property.

On Fri, Aug 10, 2012 at 11:32 AM, Dianne Hackborn <hack...@android.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »