MyCode:
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final TabHost tabHost = (TabHost) findViewById(R.id.tabhost);
// LocalActivityManager mLocalActivityManager = new Lo...
I have encountered an odd issue with the way I am showing a splash form, that causes an InvalidAsynchronousStateException to be thrown.
First of all, here is the code for Main{} where I start the splash form:
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDe...
Hi,
I'm trying to serialize an object which contains an object which implements IEnumerable<>. The last object also contains an object which implements IEnumerable<>. The objects strucutre is as followed:
[Serializable]
public class A
{
public B _b {get; set; }
}
[Serializable]
public class B : IEnumerable<C>
{
public Lis...
I thought that element property syntax and attribute property syntax have no big semantical difference. However, I found that there must be some difference.
E.g. The following example just demonstrates a simple trigger:
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2...
What's the correct way of ignoring ThreadAbortException when logging exceptions?
Is it safe to just catch it in an empty catch block to make it disappear?
...
I have custom errors set in the web config file as follows:
<customErrors mode="RemoteOnly" defaultRedirect="GenericError.aspx" />
Fine and dandy... I like that mode="RemoteOnly" facilitates development...
For unhandled exceptions, I have in global.asax:
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
Respons...
Hello,
I have created a new MVC Application in VS2010 straight out the box. In the Home Controller I have ther following:
[HandleError(View = "Error")]
public ActionResult Index()
{
int num1 = 0;
int num2 = 5;
int result = num2 / num1;
return View();
}
This creates an error and a d...
I am new to code-coverage, and I am trying to get my unit tests to cover %100 of my code.
My first question is, is this possible/feasible?
My second, more specific question is, I have the following method:
/// <summary>
/// Clears frames, control groups, display groups
/// </summary>
public bool Clear()
{
try
{
this.Fr...
hi, i'm using Netbeans 6.8, jdk 1.6.0.21 and jre6u21....i developed a simple web service using nothing but sql connection, oracle datasource and when i try to deploy it it gives me the same exception each time:
SEVERE: Exception sending context initialized event to listener instance of class com.sun.xml.ws.transport.http.servlet.WSServl...
Possible Duplicate:
Should I derive custom exceptions from Exception or ApplicationException in .NET?
I've found two controversial thoughts in MSDN for this matter.
If you are designing an application that needs to create its own exceptions, derive from the ApplicationException class.
Source
For most applications, de...
Dim id as integer = 1
Dim command as sqlcommand
Dim reader as idatareader
command = db.GetSqlStringCommand("select id, image, caption from profile where id = @id and image IS NOT NULL Order By NEWID()")
db.AddInParameter(command, "@id", DbType.Int32, id)
reader = db.ExecuteReader(Command)
The code is throwing an error i've never seen ...
I have created a member variable in class as
CComPtr<IXMLDOMDocument2> m_spXMLDoc;
XML document is created as
CoCreateInstance(CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, IID_IXMLDOMDocument2, (void**)&m_spXMLDoc));
Now when application exits ,exception is occurring.Callstack is pointing to p->Release()
~CComPtrBase() throw()
...
Hi,
Can anyone tell me why this happens?
Thanks, Philip
Jul 20, 2010 9:24:13 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
java.lang.IllegalAccessError: tried to access class javassist.bytecode.StackMapTabl...
Hi
I'm using a enhanced for loop over an ArrayList and wanted to remove some elements that contain a particular value.
When I try to do this I get the above exception. I've had a look around and it seems using a enhanced for loop while modifying the collection is a bad idea. How else would I go about this?
thanks for any help.
...
Hello,
I'm using topshelf and I'm getting this exception when I try to use the "-i" option to install as a service...please help me..
Unable to cast object of type 'Magnum.CommandLineParser.SwitchElement' to type 'Magnum.CommandLineParser.IArgumentElement'.
Exception occurs in this function
static void Set(TopshelfArguments args, I...
Hello everybody.
Recently downloaded "MapKitDragAndDrop 3" package (http://github.com/digdog/MapKitDragAndDrop) to use in my app. The demo project runs smoothly.
Both DDAnnotation.h+m and DDAnnotationView.h+m files were imported as they are. The method of calling the class was also copied/pasted.
DDAnnotation *annotation = [[[DDAnnota...
I would like to conditionally enable the objc_exception_throw global breakpoint for my app, only when I am doing a Debug build (not when doing a Release or Distribution build).
Is there a way to specify this build condition in Xcode's Breakpoints window?
...
I'm transitioning from C# to java, so please bear with me...
When reading a file in C#, you simply wrap it all in a big 'using' block, so that if you have an exception, the file will still be closed. Like so (maybe inaccurate but you get the idea):
using(FileStream fs = new FileStream("c:\\myfile.txt")) {
// Any exceptions while read...
Is it possible to determine if code is currently executing in the context of a finally handler as a result of an exception being thrown? I'm rather fond of using the IDisposable pattern to implement entry/exit scoping functionality, but one concern with this pattern is that you might not necessarily want the end-of-scope behavior to occ...
Hi folks,
What's the best way to monitor exception logging in production environment? I have an application where in exceptions are logged to a text file. Everytime, i need access to these log files, i got to request backoffice team to send me a copy.
To improvise this process, i have thought of few options:
1) Email the error logs on...