Search Results

Search found 13112 results on 525 pages for 'exception duck'.

Page 70/525 | < Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >

  • TRY/CATCH_ALL vs try/catch

    - by Tim
    I've been using c++ for a while, and I'm familiar with normal try/catch. However, I now find myself on Windows, coding in VisualStudio for COM development. Several parts of the code use things like: TRY { ... do stuff } CATCH_ALL(e) { ... issue a warning } END_CATCH_ALL; What's the point of these macros? What benefit do they offer over the built-in try/catch? I've tried googling this, but "try vs TRY" is hard to search for.

    Read the article

  • NHibernate unmapped class exception

    - by John Prideaux
    I am trying to implement a one-to-many relationship using NHibernate 2.1.2 but keep getting "Association references unmapped class" exceptions. I have verified that my hbm.xml files are embedded resource. Here are my classes and mappings. Any ideas? public class OrderStatus { public virtual decimal MainCommit { get; set; } public virtual decimal CommitNumber { get; set; } public virtual string InvoiceNumber { get; set; } public virtual string ShipTo { get; set; } public virtual string CustomerOrderNumber { get; set; } public virtual string Station { get; set; } public virtual DateTime RequestedShipDate { get; set; } public virtual decimal EstimatedValue { get; set; } public virtual decimal EstimatedWeight { get; set; } public virtual string Customer { get; set; } public virtual DateTime InvoiceDate { get; set; } public virtual ICollection<Promise> Promises { get; set; } } <class name="AladdinDb.Models.OrderStatus, AladdinDb" table="vorder_status"> <id name="CommitNumber" type="decimal" column="commit_no"> <generator class="assigned"> <param name="property"> Plan </param> </generator> </id> <property name="MainCommit" column="main_commit" type="decimal" /> <property name="InvoiceNumber" column="invoice_no" type="string" /> <property name="ShipTo" column="ship_to" type ="string"/> <property name="CustomerOrderNumber" column="cust_order_no" type="string" /> <property name="Station" column="station" type="string" /> <property name="RequestedShipDate" column="req_ship_date" type="DateTime" /> <property name="EstimatedValue" column="estimated_value" type="decimal"/> <property name="EstimatedWeight" column="estimated_weight" type="decimal" /> <property name="Customer" column="customer" type="string" /> <property name="InvoiceDate" column="invoice_date" /> <set name="Promises"> <key column="commit_no"></key> <one-to-many class="Promise" /> </set> </class> public class Promise { public virtual decimal CommitNumber { get; set; } public virtual DateTime PromiseDate { get; set; } public virtual string WhoAsked { get; set; } public virtual string WhoGave { get; set; } public virtual string Iffy { get; set; } } <class name="AladdinDb.Models.Promise, AladdinDb" table="promise"> <id name="CommitNumber" type="decimal" column="commit_no"> <generator class="assigned" /> </id> <property name="PromiseDate" column="promise_date" /> <property name="WhoAsked" column="who_asked" /> <property name="WhoGave" column="who_gave" /> <property name="Iffy" column="iffy" /> </class>

    Read the article

  • .Except<T> is throwing an Exception

    - by Jason
    I have the following code: Public Shared Function GetAvailableManufacturers() As List(Of Manufacturer) 'first get all the live orders and extract their mfrs' Dim sos As List(Of OrderForm) = GetFormsByStatus(StockStatus.Building) Dim unavailableMfrs As New List(Of Manufacturer) For Each so As StockingOrder In sos unavailableMfrs.Add(so.Source) Next 'then remove all mfrs with an open SO from a list of all mfrs' Dim allMfrs As List(Of Manufacturer) = Manufacturer.GetManufacturers Return allMfrs.Except(unavailableMfrs) <----- error here End Function Explanation of what the above does: GetFormsByStatus() self-explanatory GetManufacturers() returns a list of all manufacturers in the database My idea to get available manufacturers was to get a list of all the manufacturers in my open forms, then get a list of all manufacturers and exclude all the manufacturers in the first list, illustrated like so (pseudo): List A: {1,2,3,4,5,6,7,8,9,10} List B: {5,7,10} Result: {1,2,3,4,6,8,9} I have set up my Manufacturer class according to this article so that it can be compared, but I'm still getting this error: Unable to cast object of type '<ExceptIterator>d__92'1[csCore.Manufacturer]' to type 'System.Collections.Generic.List'1[csCore.Manufacturer]'. I thought at first that because during testing GetFormsByStatus() returns 0 results maybe that was causing problems, but it doesn't make sense that Except() wouldn't work if the provided list had 0 items. Can anyone spot what I'm doing wrong? Thanks so much!

    Read the article

  • How to avoid an HttpException due to timeout

    - by Dan
    I'm working on a website powered by .NET asp/C# code. The clients require that sessions have a 25 minute timeout. However, sometimes the site is used, and a user stays connected for long periods of time (longer than 25 mins). Session_End is triggered: protected void Session_End(Object sender, EventArgs e) { Hashtable trackingInformaiton = (Hashtable)Application["trackingInformation"]; trackingInformaiton.Remove(Session["trackingID"]); } The user returns some time later, but when they interact with the website, they get an error, and we get this email notification: User: Unauthenticated User Error: System.Web.HttpException Description: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request... The telling part of the stack trace is System.Web.UI.Control.AddedControl. Apparently, the server has thrown away the session data, and is sending new data, but the client is trying to deal with old data. Hence the error that "the control tree into which viewstate is being loaded [doesn't] match the control tree that was used to save the viewstate during the prevoius request." So here's the question. How can I force instruct the user's browser to redirect to a "you're logged out" screen when the connection times out? (Is it something I should add to the Session_End method?)

    Read the article

  • ArrayIndexOutOfBoundsException with custom Android Adapter for multiple views in ListView

    - by Dan Watling
    I am attempting to create a custom Adapter for my ListView since each item in the list can have a different view (a link, toggle, or radio group), but when I try to run the Activity that uses the ListView I receive an error and the app stops. The application is targeted for the Android 1.6 platform. The code: public class MenuListAdapter extends BaseAdapter { private static final String LOG_KEY = MenuListAdapter.class.getSimpleName(); protected List<MenuItem> list; protected Context ctx; protected LayoutInflater inflater; public MenuListAdapter(Context context, List<MenuItem> objects) { this.list = objects; this.ctx = context; this.inflater = (LayoutInflater)this.ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } @Override public View getView(int position, View convertView, ViewGroup parent) { Log.i(LOG_KEY, "Position: " + position + "; convertView = " + convertView + "; parent=" + parent); MenuItem item = list.get(position); Log.i(LOG_KEY, "Item=" + item ); if (convertView == null) { convertView = this.inflater.inflate(item.getLayout(), null); } return convertView; } @Override public boolean areAllItemsEnabled() { return false; } @Override public boolean isEnabled(int position) { return true; } @Override public int getCount() { return this.list.size(); } @Override public MenuItem getItem(int position) { return this.list.get(position); } @Override public long getItemId(int position) { return position; } @Override public int getItemViewType(int position) { Log.i(LOG_KEY, "getItemViewType: " + this.list.get(position).getLayout()); return this.list.get(position).getLayout(); } @Override public int getViewTypeCount() { Log.i(LOG_KEY, "getViewTypeCount: " + this.list.size()); return this.list.size(); } } The error I receive: java.lang.ArrayIndexOutOfBoundsException at android.widget.AbsListView$RecycleBin.addScrapView(AbsListView.java:3523) at android.widget.ListView.measureHeightOfChildren(ListView.java:1158) at android.widget.ListView.onMeasure(ListView.java:1060) at android.view.View.measure(View.java:7703) I do know that the application is returning from getView and everything seems in order. Any ideas on what could be causing this would be appreciated. Thanks, -Dan

    Read the article

  • "no block given" errors with cache_money

    - by emh
    i've inherited a site that in production is generating dozens of "no block given" exceptions every 5 minutes. the top of the stack trace is: vendor/gems/nkallen-cache-money-0.2.5/lib/cash/accessor.rb:42:in `add' vendor/gems/nkallen-cache-money-0.2.5/lib/cash/accessor.rb:33:in `get' vendor/gems/nkallen-cache-money-0.2.5/lib/cash/accessor.rb:22:in `call' vendor/gems/nkallen-cache-money-0.2.5/lib/cash/accessor.rb:22:in `fetch' vendor/gems/nkallen-cache-money-0.2.5/lib/cash/accessor.rb:31:in `get' so it appears that the problem is in the cache money plugin. has anyone experienced something similar? i've cut and pasted the relevant code below -- anyone more familiar with blocks able to discern any obvious problems? 11 def fetch(keys, options = {}, &block) 12 case keys 13 when Array 14 keys = keys.collect { |key| cache_key(key) } 15 hits = repository.get_multi(keys) 16 if (missed_keys = keys - hits.keys).any? 17 missed_values = block.call(missed_keys) 18 hits.merge!(missed_keys.zip(Array(missed_values)).to_hash) 19 end 20 hits 21 else 22 repository.get(cache_key(keys), options[:raw]) || (block ? block.call : nil) 23 end 24 end 25 26 def get(keys, options = {}, &block) 27 case keys 28 when Array 29 fetch(keys, options, &block) 30 else 31 fetch(keys, options) do 32 if block_given? 33 add(keys, result = yield(keys), options) 34 result 35 end 36 end 37 end 38 end 39 40 def add(key, value, options = {}) 41 if repository.add(cache_key(key), value, options[:ttl] || 0, options[:raw]) == "NOT_STORED\r\n" 42 yield 43 end 44 end

    Read the article

  • Why is C++0x's `noexcept` checked dynamically?

    - by rlbond
    I am curious about the rationale behind noexcept in the C++0x FCD. throw(X) was depreciated, but noexcept seems to do the same thing. Is there a reason that noexcept isn't checked at compile time? It seems that it would be better if these functions were checked statically that they only called throwing functions within a try block.

    Read the article

  • Syncronization Exception

    - by Kurru
    Hi I have two threads, one thread processes a queue and the other thread adds stuff into the queue. I want to put the queue processing thread to sleep when its finished processing the queue I want to have the 2nd thread tell it to wake up when it has added an item to the queue However these functions call System.Threading.SynchronizationLockException: Object synchronization method was called from an unsynchronized block of code on the Monitor.PulseAll(waiting); call, because I havent syncronized the function with the waiting object. [which I dont want to do, i want to be able to process while adding items to the queue]. How can I achieve this? Queue<object> items = new Queue<object>(); object waiting = new object(); 1st Thread public void ProcessQueue() { while (true) { if (items.Count == 0) Monitor.Wait(waiting); object real = null; lock(items) { object item = items.Dequeue(); real = item; } if(real == null) continue; .. bla bla bla } } 2nd Thread involves public void AddItem(object o) { ... bla bla bla lock(items) { items.Enqueue(o); } Monitor.PulseAll(waiting); }

    Read the article

  • iPhone UI addSubview causing concurrency exception

    - by Eli
    This is really odd... I run my app, and while it is opening and the views are constructing I get: Collection <CALayerArray: 0x124650> was mutated while being enumerated. The code trace goes through the following: main UIApplicationMain -[UIApplication _run] CFRunLoopRunInMode CFRunLoopRunSpecific _UIApplicationHandleEvent -[UIApplication sendEvent:] -[UIApplication handleEvent:withNewEvent:] -[UIApplication _runWithURL:sourceBundleID:] -[UIApplication _performInitilizationWithURL:sourceBundleID:] -[AppDelegate applicationDidFinishLaunching:] +[Controller initializeController] //This is my own function [window addSubview: pauseMenuController.view] //This is the last point of my code it goes through -[UIView(Hierarchy) addSubview:] -[UIView(Internal) _addSubview:positioned:relativeTo:] -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:] -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:] -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:] _NSFastEnumerationMutationHandler objc_exception_throw I've run the game lots and lots and lots of times and I've never seen this, then suddenly it popped up. The weird thing is that I'm not creating any other threads (that I know of) until after this code all gets called. It'll be easier for me to debug this if someone can give me some explanation of what might be getting modified while it's being accessed in a UIView. Does it have something to do with adding something to the view while it's already adding something, maybe? Any ideas?

    Read the article

  • SQL Server JDBC Exception

    - by user267581
    When using ANT to build my Java application I keep getting this error. I have tried multiple times to use SQLJDBC.JAR and SQLJDBC4.JAR but continually receive this error message. I am completely stumpped why this error is received even after upgrading to sqljdbc4.jar. [javadoc] java.lang.UnsupportedOperationException: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.

    Read the article

  • C# exception when calling stored procedure: ORA-01460 - unimplemented or unreasonable conversion req

    - by Taylor L
    I'm trying to call a stored procedure using ADO .NET and I'm getting the following error: ORA-01460 - unimplemented or unreasonable conversion requested The stored procedure I'm trying to call has the following parameters: param1 IN VARCHAR2, param2 IN NUMBER, param3 IN VARCHAR2, param4 OUT NUMBER, param5 OUT NUMBER, param6 OUT NUMBER, param7 OUT VARCHAR2 Below is the C# code I'm using to call the stored procedure: OracleCommand command = connection.CreateCommand(); command.CommandType = CommandType.StoredProcedure; command.CommandText = "MY_PROC"; OracleParameter param1 = new OracleParameter() { ParameterName = "param1", Direction = ParameterDirection.Input, Value = p1, OracleDbType = OracleDbType.Varchar2, Size = p1.Length }; OracleParameter param2 = new OracleParameter() { ParameterName = "param2", Direction = ParameterDirection.Input, Value = p2, OracleDbType = OracleDbType.Decimal }; OracleParameter param3 = new OracleParameter() { ParameterName = "param3", Direction = ParameterDirection.Input, Value = p3, OracleDbType = OracleDbType.Varchar2, Size = p3.Length }; OracleParameter param4 = new OracleParameter() { ParameterName = "param4", Direction = ParameterDirection.Output, OracleDbType = OracleDbType.Decimal }; OracleParameter param5 = new OracleParameter() { ParameterName = "param5", Direction = ParameterDirection.Output, OracleDbType = OracleDbType.Decimal}; OracleParameter param6 = new OracleParameter() { ParameterName = "param6", Direction = ParameterDirection.Output, OracleDbType = OracleDbType.Decimal }; OracleParameter param7 = new OracleParameter() { ParameterName = "param7", Direction = ParameterDirection.Output, OracleDbType = OracleDbType.Varchar2, Size = 32767 }; command.Parameters.Add(param1); command.Parameters.Add(param2); command.Parameters.Add(param3); command.Parameters.Add(param4); command.Parameters.Add(param5); command.Parameters.Add(param6); command.Parameters.Add(param7); command.ExecuteNonQuery(); Any ideas what I'm doing wrong?

    Read the article

  • VB.NET invalid cast exception

    - by user127147
    Hi there, I have a simple application to store address details and edit them. I have been away from VB for a few years now and need to refreash my knowledge while working to a tight deadline. I have a general Sub responsible for displaying a form where user can add contact details (by pressing button add) and edit them (by pressing button edit). This sub is stored in a class Contact. The way it is supposed to work is that there is a list with all the contacts and when new contact is added a new entry is displayed. If user wants to edit given entry he or she selects it and presses edit button Public Sub Display() Dim C As New Contact C.Cont = InputBox("Enter a title for this contact.") C.Fname = frmAddCont.txtFName.Text C.Surname = frmAddCont.txtSName.Text C.Address = frmAddCont.txtAddress.Text frmStart.lstContact.Items.Add(C.Cont.ToString) End Sub I call it from the form responsible for adding new contacts by Dim C As New Contact C.Display() and it works just fine. However when I try to do something similar using the edit button I get errors - "Unable to cast object of type 'System.String' to type 'AddressBook.Contact'." Dim C As Contact If lstContact.SelectedItem IsNot Nothing Then C = lstContact.SelectedItem() C.Display() End If I think it may be something simple however I wasn't able to fix it and given short time I have I decided to ask for help here. Thank you

    Read the article

  • Amazon Elastic MapReduce: Exception from FileSystem

    - by S.N
    Hi, I run my application using ruby client: ruby elastic-mapreduce -j j-20PEKMT9BRSUC --jar s3n://sakae55/lib/edu.cit.som.jar --main-class edu.cit.som.hadoop.SOMDriver --arg s3n://sakae55/repository/input/ecoli/ --arg s3n://sakae55/repository/output/ecoli/pl/ --arg s3n://sakae55/repository/data/ecoli/som.txt Then, I am seeing the following error: java.lang.IllegalArgumentException: This file system object (file:///) does not support access to the request path 'hdfs://i -10-195-207-230.ec2.internal:9000/mnt/var/lib/hadoop/tmp/mapred/system/job_201004221221_0017/job.jar' You possibly called Fi eSystem.get(conf) when you should of called FileSystem.get(uri, conf) to obtain a file system supporting your path. at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:320) at org.apache.hadoop.fs.RawLocalFileSystem.pathToFile(RawLocalFileSystem.java:52) at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:416) at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:259) at org.apache.hadoop.fs.FileSystem.isDirectory(FileSystem.java:676) at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:200) at org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1184) at org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1160) at org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1132) at org.apache.hadoop.mapred.JobClient.configureCommandLineOptions(JobClient.java:662) at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:729) at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1026) at edu.cit.som.hadoop.SOMDriver.runIteration(SOMDriver.java:106) at edu.cit.som.hadoop.SOMDriver.train(SOMDriver.java:69) at edu.cit.som.hadoop.SOMDriver.run(SOMDriver.java:52) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79) at edu.cit.som.hadoop.SOMDriver.main(SOMDriver.java:36) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.RunJar.main(RunJar.java:155) at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79) at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68) I am not sure why the error references to "file:///" even though all the arguments I pass do not use the schema.

    Read the article

  • Asp.net HttpWebResponse - how can I not depend on WebException for flow control?

    - by Campos
    I need to check whether the request will return a 500 Server Internal Error or not (so getting the error is expected). I'm doing this: HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest; request.Method = "GET"; HttpWebResponse response = request.GetResponse() as HttpWebResponse; if (response.StatusCode == HttpStatusCode.OK) return true; else return false; But when I get the 500 Internal Server Error, a WebException is thrown, and I don't want to depend on it to control the application flow - how can this be done?

    Read the article

  • Java Server Client Program I/O Exception

    - by AjayP
    I made this program: http://java.sun.com/docs/books/tutorial/networking/sockets/clientServer.html And it works perfectly if I put the server's hostname as 127.0.0.1 or my computers name (Ajay-PC). However these 2 methods are LAN or local only not internet. So I changed it to my internet ip. 70.128.xxx.xxx etc. But it didn't work. I checked: canyouseeme.org and it said 4444 was CLOSED. So I did a quick port forward. Portforward: Name: My Java Program Start Port: 4444 End Port: 4444 Server IP: 10.0.0.12 <-- (Yeah this is my Local IP I checked) then I tried canyouseeme.org AGAIN: and it said 4444 was OPEN I ran my server client program and it yet to work. So my problem is the client server program is not working on the internet just locally. So something is blocking it and I don't know what. Computer: Windows Vista x64 Norton AntiVirus 2010 Thanks! I'll give best answer or whatever to who ever answers the best ;) :)

    Read the article

  • Index out of bounds error

    - by sprasad12
    Hello, I am working on a program where i am recreating the saved widgets back on to the boundary panel. When i am creating them i am also trying to put the values into the ArrayList so that if i want to update and save the opened project i should be able to do so by getting the values from the ArrayList. Here is how the code looks like: for(int i = 0; i < result.length; i++){ if(ename.contains(result[i].getParticipateEntityName())){ ername.add(ename.indexOf(result[i].getParticipateEntityName()), result[i].getParticipateRelatioshipName()); etotalpartial.add(ename.indexOf(result[i].getParticipateEntityName()), result[i].getTotalPartial()); }else if(wename.contains(result[i].getParticipateEntityName())){ wrname.add(wename.indexOf(result[i].getParticipateEntityName()), result[i].getParticipateRelatioshipName()); } } Here ename, ername, etotalpartial, wename and wrname are all ArrayList. This piece of code is included in an asynchronous class method. When i run the code i get error at "ername.add(ename......". Here is the error stack: java.lang.IndexOutOfBoundsException: Index: 1, Size: 0 at java.util.ArrayList.add(ArrayList.java:367) at com.e.r.d.client.ERD1$16.onSuccess(ERD1.java:898) at com.e.r.d.client.ERD1$16.onSuccess(ERD1.java:1) at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:216) at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287) at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:393) at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) at java.lang.Thread.run(Thread.java:619) I am not sure what i am doing wrong. Any input will be of great help. Thank you.

    Read the article

  • Handling Solr read and write timeout exception

    - by Azhar
    Hello, I am new to solr. I have developed a an website which uses solr for indexing. I want to handle the timeouts that can occur during solr read and write index.Please guide me on how can i handle these exceptions. I am using solrj as solr client and my website and solr server are running on the tomcat. Thnak you!

    Read the article

  • unhandeled exception occured in c#

    - by abid
    hey. i`m getting this error that system.data.datarowview is not permitted in this contexxt. valid expressions are constants expressions and ( in some contexts). column name are not permitted.. can any body guide me what this error says.. can any one provide me a suggestion whether where im wrong.. any guesses guys??? im not getting it.. :/

    Read the article

  • Should a Perl constructor return an undef or a "invalid" object?

    - by DVK
    Question: What is considered to be "Best practice" - and why - of handling errors in a constructor?. "Best Practice" can be a quote from Schwartz, or 50% of CPAN modules use it, etc...; but I'm happy with well reasoned opinion from anyone even if it explains why the common best practice is not really the best approach. As far as my own view of the topic (informed by software development in Perl for many years), I have seen three main approaches to error handling in a perl module (listed from best to worst in my opinion): Construct an object, set an invalid flag (usually "is_valid" method). Often coupled with setting error message via your class's error handling. Pros: Allows for standard (compared to other method calls) error handling as it allows to use $obj->errors() type calls after a bad constructor just like after any other method call. Allows for additional info to be passed (e.g. 1 error, warnings, etc...) Allows for lightweight "redo"/"fixme" functionality, In other words, if the object that is constructed is very heavy, with many complex attributes that are 100% always OK, and the only reason it is not valid is because someone entered an incorrect date, you can simply do "$obj->setDate()" instead of the overhead of re-executing entire constructor again. This pattern is not always needed, but can be enormously useful in the right design. Cons: None that I'm aware of. Return "undef". Cons: Can not achieve any of the Pros of the first solution (per-object error messages outside of global variables and lightweight "fixme" capability for heavy objects). Die inside the constructor. Outside of some very narrow edge cases, I personally consider this an awful choice for too many reasons to list on the margins of this question. UPDATE: Just to be clear, I consider the (otherwise very worthy and a great design) solution of having very simple constructor that can't fail at all and a heavy initializer method where all the error checking occurs to be merely a subset of either case #1 (if initializer sets error flags) or case #3 (if initializer dies) for the purposes of this question. Obviously, choosing such a design, you automatically reject option #2.

    Read the article

  • C# WMI Eventwatcher code stopped working on Windows 7 with security exception

    - by Flores
    This is code that worked fine on Windows XP for years. User is not local administrator. WqlEventQuery query = new WqlEventQuery("SELECT * FROM Win32_ProcessStopTrace"); ConnectionOptions co = new ConnectionOptions(); co.EnablePrivileges = true; ManagementEventWatcher watcher = new ManagementEventWatcher(new ManagementScope(@"root\cimv2",co), query); watcher.EventArrived += StopEventArrived; watcher.Start(); This throws an SecurityException on Windows 7, Access Denied when running as a non admin. On XP this works fine without being admin. On this link MS states that 'Windows 7: Low-integrity users have read-only permissions for local WMI operations.'. I guess this is the problem. But I can't find any clue on how to change this.

    Read the article

  • unhandled exception occured in c#

    - by abid
    hey. i`m getting this error that system.data.datarowview is not permitted in this contexxt. valid expressions are constants expressions and ( in some contexts). column name are not permitted.. can any body guide me what this error says.. can any one provide me a suggestion whether where im wrong.. any guesses guys??? im not getting it.. :/

    Read the article

  • To Throw or Not to Throw

    - by serhio
    // To Throw void PrintType(object obj) { if(obj == null) { throw new ArgumentNullException("obj") } Console.WriteLine(obj.GetType().Name); } // Not to Throw void PrintType(object obj) { if(obj != null) { Console.WriteLine(obj.GetType().Name); } } What principle to keep? Personally Personally I prefer the first one its say developer-friendly. The second one its say user-friendly. What do you think?

    Read the article

< Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >