मेरा मानक अस्वीकरण: मैं इस उत्पाद पर एक डेवलपर हूं।
कंपनी द्वारा लिखे गए एक उत्पाद (रनटाइम इंटेलिजेंस) का उपयोग करके मैं (प्रीपेक्टिव सॉल्यूशंस) के लिए काम करता हूं, आप न केवल त्रुटि रिपोर्टिंग इंजेक्ट कर सकते हैं बल्कि उपयोगकर्ताओं को आपके एप्लिकेशन का उपयोग करने पर ट्रैक करने की क्षमता और न्यूनतम कोडिंग के साथ वे किन सुविधाओं का उपयोग कर रहे हैं ।
कोड इंजेक्शन (या आईएल बुनाई) करने के लिए डॉटफुस्केटर का उपयोग करके हम आपके आवेदन बाइनरी में नया कोड डालते हैं जो हमारी सुविधा (या वैकल्पिक रूप से किसी भी अन्य मनमानी यूआरएल) पर होस्ट किए गए सर्वर पर उपयोग डेटा भेजता है। यदि आप हमें डेटा भेजते हैं तो हम आपको उपयोग पर कई शक्तिशाली विश्लेषण टूल और रिपोर्ट प्रदान करते हैं।
इस कार्यक्षमता का एक मूल संस्करण विजुअल स्टूडियो 2010 में शामिल किया जाना चाहिए और साथ ही साथ एक मुफ्त डेटा रिपोर्टिंग पोर्टल तक पहुंच (लेकिन कोई एसएलए, डेटा प्रतिधारण गारंटी या डेटा गोपनीयता के साथ) शामिल नहीं है।
उपयोग जानकारी के साथ मनमाने ढंग से डेटा भेजने की क्षमता वाणिज्यिक उत्पाद तक ही सीमित है, लेकिन आप पूरी तरह से कार्यात्मक, खाली समय सीमित मूल्यांकन संस्करण के लिए प्रीपेक्टिव सॉल्यूशंस से संपर्क कर सकते हैं।
आप नीचे दिए गए नमूना कोड के साथ रिपोर्टिंग त्रुटि को पूरा कर सकते हैं:
public partial class app : Application {
// field to temporarily store exception data
private Exception exp;
void AppStartup(object sender, StartupEventArgs args) {
// add a handler to catch any unhandled exceptions
this.DispatcherUnhandledException += new DispatcherUnhandledExceptionEventHandler(ErrorHandler);
Window1 mainWindow = new Window1();
mainWindow.ShowDialog();
}
// this will prompt the user if they want to report the exception
void ErrorHandler(object sender, DispatcherUnhandledExceptionEventArgs e) {
this.exp = e.Exception;
if (MessageBox.Show("A " + exp.Message + " exception happened, should I report it?", "Error Occurrend", MessageBoxButton.YesNo) == MessageBoxResult.Yes) {
ErrorHappened();
e.Handled = true;
}
}
// this method is called by the above ErrorHandler method and when run through Dotfuscator additional code will be injected into this method that will send a usage data message back to the server and the data in the dictionary (which will be exception data) returned by the ErrorData method will be included into the message and be stored and reported on the server
[Feature("Exception", EventType = FeatureEventTypes.Tick, ExtendedKeySourceElement = SourceElements.Method, ExtendedKeySourceName = "ErrorData")]
private void ErrorHappened() {
// This is here as a placeholder for the exception feature attribute which will exit the application when executed
AppShutdown(true);
}
// this method takes the exception data from the exp field and returns it as a dictionary of name/value pairs
public Dictionary<string, string> ErrorData() {
var retval = new Dictionary<string,string>();
if (null != exp) {
retval.Add("Error Message",exp.Message);
retval.Add("Stack Trace",exp.StackTrace);
}
return retval;
}
}
स्रोत
2009-07-26 01:29:00
आप अभी भी अन्य धागे :) – cwap
और यह भी वहाँ uncatchable excpetions हैं द्वारा फेंका अपवाद को पकड़ने एक समस्या है चाहते हैं; यानी StackOverflowException;) – Wilhelm
"यदि कोई अपवाद मेरे आवेदन के शीर्ष तक सभी तरह से प्रचारित करता है (जो, ज़ाहिर है, कभी नहीं होगा) ..." आप हमें एक मजाकिया चेहरा जोड़ना भूल गए हैं ताकि आप जान सकें कि आप मजाक कर रहे हैं। :) यह कहना बेहद जबरदस्त नहीं है कि सभी ऐप्स क्रैश हो जाते हैं। –