Search Results

Search found 13191 results on 528 pages for 'unhandled exception'.

Page 168/528 | < Previous Page | 164 165 166 167 168 169 170 171 172 173 174 175  | Next Page >

  • Creating an OpenID provider with DotNetOpenAuth

    - by user1652616
    I'm trying to implement an OpenID provider with DotNetOpenAuth. I supply an OpenID url, and the consumer discovers my endpoint. I log into my provider, and the provider returns a Claimed Identifier and a Local Identifier to the consumer. But the consumer response has the following exception: The OpenID Provider issued an assertion for an Identifier whose discovery information did not match. Assertion endpoint info: ClaimedIdentifier: http://localhost/OpenIDUser.aspx/myuser ProviderLocalIdentifier: http://localhost/OpenIDUser.aspx/myuser ProviderEndpoint: http://localhost/OpenIDAuth.aspx OpenID version: 2.0 Service Type URIs: Discovered endpoint info: [] http://localhost/OpenIDAuth.aspx is my endpoint. http://localhost/OpenIDUser.aspx/myuser is my user identifier url, and I can browse to it successfully. It has a link to the endpoint in the header as follows: <link rel="openid.server" href="http://localhost/OpenIDAuth.aspx"></link> No matter what I try, the "Discovered endpoint info: []" part of the exception is always an empty array. Can anyone please help?

    Read the article

  • loading crystal report in windows xp

    - by Sumit Chawla
    I have prepared a wpf application using visual studio 2010 in windows 7 which includes crystal report viewer. I tried to run the application on another windows 7 pc with CR runtime installed, it worked properly. I tried the same thing with windows xp but everytime the crystal report loads it gives an unhandled exception and the whole app stops working and closes. what to do in this case? or give me some suggestions how to make work with window-XP

    Read the article

  • testing the controller in asp.net mvc

    - by csetzkorn
    Hi, I would like to test the validation of submitted DTO. This is the bare bone of a controller create action: [AcceptVerbs(HttpVerbs.Post)] public RedirectToRouteResult Create(SomeDTO SomeDTO) { SomeObject SomeObject = null; try { SomeObject = this.RepositoryService.getSomeObjectRepository().Create(SomeDTO, this.RepositoryService); } catch (BrokenRulesException ex) { ex.AddModelStateErrors(ModelState, "Model"); } catch (Exception e) { ModelState.AddModelError("Exception", e.Message); } TempData["ViewData"] = ViewData; TempData["SomeDTO "] = SomeDTO; return ModelState.IsValid ? RedirectToAction("SomeObjectDetail", new { Id = SomeObject.Id }) : RedirectToAction("Form"); } The mechanics , although not relevant, is as follows: I have a strongly typed view = form which submits a dto to this action which either returns the form or the details page of the created object. I would like to unit test whether the Model contains certain key/errorMessage combinations given some invalid dto. Did someone do similar stuff? Any pointers would be very much appreciated. Thanks. Best wishes, Christian

    Read the article

  • Microsoft AntiXSS in Medium Trust :Error

    - by aramugam
    I want to include Microsoft AntiXss V1.5 library on my live site running in a medium trust setting.However, I got an error something like: Required permissions cannot be acquired. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired. I tried this in full trust setting on my development machine and everything works good.Looks like this will run only in full trust configuration......Does anybody knows a solution or workaround for this?

    Read the article

  • RMO on Windows 7 - The Specified module could not be found

    - by AGoodDisplayName
    My machine: Windows XP (x86), VS2008, .net 3.5, sql server 2005, WinForms - App works fine. Production Machines: Windows 7 (x64), SQl Server 2005 Express - App Starts but throws exception Visual Studio Targeting x86 on setup project and RMO project. Visual Studio gives me a a couple warnings but I can still build: Unable to find dependency 'MICROSOFT.SQLSERVER.MANAGEMENT.SQLPARSER' (Signature='89845DCD8080CC91' Version='10.0.0.0') of assembly 'Microsoft.SqlServer.Smo.dll' Unable to find dependency 'MICROSOFT.SQLSERVER.MANAGEMENT.SQLPARSER' (Signature='89845DCD8080CC91' Version='10.0.0.0') of assembly 'Microsoft.SqlServer.Management.SmoMetadataProvider.dll' This is a simple RMO (Replication Management Objects) app that initiates a pull subscription in SQL Server 2005 and displays status. Works fine on my machine, but fails on the production machine. I'm using a setup project to install the app on the production machine, but I think I'm missing a dependency somewhere, but I can't figure it out. On the production machine the app starts fine, but when I try to synch the subscription i get: System.IO.FileNotFoundException: The Specified module could not be found. (Exception from HResult: 0x8007007E)

    Read the article

  • how to insert into database from stored procedure in log4net?

    - by Samreen
    I have to log thread context properties like this: string logFilePath = AppDomain.CurrentDomain.BaseDirectory + "log4netconfig.xml"; FileInfo finfo = new FileInfo(logFilePath); log4net.Config.XmlConfigurator.ConfigureAndWatch(finfo); ILog logger = LogManager.GetLogger("Exception.Logging"); log4net.ThreadContext.Properties["MESSAGE"] = exception.Message; log4net.ThreadContext.Properties["MODULE"] = "module1"; log4net.ThreadContext.Properties["COMPONENT"] = "component1"; logger.Debug("test"); and the configuration file is: <configuration> <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,Log4net"/> </configSections> <log4net> <logger name="Exception.Logging" level="Debug"> <appender-ref ref="AdoNetAppender"/> </logger> <appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender"> <connectionString value="Data Source=xe;User ID=test;Password=test;" /> <connectionType value="System.Data.OracleClient.OracleConnection, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <bufferSize value="10000"/> <commandText value="Log_Exception_Pkg.Insert_Log" /> <commandType value="StoredProcedure" /> <parameter> <parameterName value="@p_Error_Message" /> <dbType value="String" /> <size value="255" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%property{MESSAGE}"/> </layout> </parameter> <parameter> <parameterName value="@p_Module" /> <dbType value="String" /> <size value="225" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%property{MODULE}"/> </layout> </parameter> <parameter> <parameterName value="@p_Component" /> <dbType value="String" /> <size value="225" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%property{COMPONENT}"/> </layout> </parameter> </appender> </log4net> </configuration> But its not inserting them in the database. How can I get that to work?

    Read the article

  • Get property name from class

    - by Polaris
    I need property name in my app and I use next code to get it string PropertyName =SomeClass.GetType().GetProperty("Category").Name; But I think that is bad idea. Because I use web service classes and I dont know when property names can be changed. This code give me exception only in runtime. But if I write something like this SomeClassInstance.Property.GetProperyName i get exception in moment of compilation and repair this problem. Is it possible to get property name dynamically?

    Read the article

  • How can I get Perl to detect the bad UTF-8 sequences?

    - by gorilla
    I'm running Perl 5.10.0 and Postgres 8.4.3, and strings into a database, which is behind a DBIx::Class. These strings should be in UTF-8, and therefore my database is running in UTF-8. Unfortunatly some of these strings are bad, containing malformed UTF-8, so when I run it I'm getting an exception DBI Exception: DBD::Pg::st execute failed: ERROR: invalid byte sequence for encoding "UTF8": 0xb5 I thought that I could simply ignore the invalid ones, and worry about the malformed UTF-8 later, so using this code, it should flag and ignore the bad titles. if(not utf8::valid($title)){ $title="Invalid UTF-8"; } $data->title($title); $data->update(); However Perl seems to think that the strings are valid, but it still throws the exceptions. How can I get Perl to detect the bad UTF-8?

    Read the article

  • Printing and exporting from Crystal Reports Viewer throws error

    - by MAW74656
    I'm using the .net Crystal Reports viewer to display a report. This works properly, but when I click on the print option, and then click "OK" on the options popup, I get the following error: Access is denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: Access is denied. And the same thing when I try to export. I'm running this on the Visual Studio development server, VS2008. What can I do to correct this?

    Read the article

  • SharePoint: The template you have chosen is invalid or cannot be found

    - by user231976
    Exception in frmMPInstall.CreateSite: Microsoft.SharePoint.SPException: The template you have chosen is invalid or cannot be found. --- System.Runtime.InteropServices.COMException (0x81071E44): The template you have chosen is invalid or cannot be found. at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId) at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId) --- End of inner exception stack trace At the time of Deploying the solution.It shows above error . It happed only in 64 bit processer. How to solve this problem help me please thanks.

    Read the article

  • Image Preloading in Canvas

    - by smokinguns
    I'm drawing an Image on the canvas using the drawImage function. This is how Im setting the src property of the image: var img = new Image(); // Create new Image object img.src = 'test.php?filename=myfile.jpg' and then oCanvas.width = 600; oCanvas.height = 400; oContext.drawImage(img, 0, 0, 600, 400); The problem is that if the src isn't set then I get the foll error:"uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMCanvasRenderingContext2D.drawImage]" . I know I get this error coz the image hasnt finished loading. I added an alert just before the call to drawImage function to let the image finish loading and it seems to work. But it's a pain in the neck. How do I check if the image has finished loading? BTW I have to set the src property by calling a php file.

    Read the article

  • How to debug without Visual Studio?

    - by aF
    Hello, Python - c++ dll - c# dll I have a com interop c# dll that is loaded in a wrapper c++ dll throught the .tlb file generated in c# to be used in a python project. When I run in my computer it works fine but when I run in a computer that just got formated it gives: WindowsError: exception code 0xe0434f4d I have the redistribute c++ installed and the .net compact framework 3.5 on the formatted computer. How can I see what is the correct exception on a computer that does not have visual studio installed? How can I debug all of this? I can't debug the dll's itself can I? Note: in my computer all works well so maybe is some dll or file missing. I allready used Dependency Walker to see if there's some dll missing, and nop!

    Read the article

  • Ways to make your WCF services compatible with non-.NET consumers

    - by Mayo
    I'm working on adding a WCF services layer to my existing .NET application. This layer will be hosted in IIS and will be consumed by a variety of UIs, at least one of which will not use Microsoft technologies. I can make a Web service in WCF that is consumed by my .NET application. However, I'm concerned about things that work in the .NET world but not with other technologies. For example, simply throwing an exception from my WCF service works fine in .NET. But according to this article, one should approach exception handling with fault contracts to ensure compatibility with non-.NET consumers. The author labels this lack of foresight as The Fallacy of the .NET-Only World. Does anyone have any high level suggestions or links to articles that cover interoperability between WCF and non-.NET consumers? I realize I'm potentially working against the YAGNI principle. I'm only really looking to avoid things that will be incredibly difficult to overcome later when the developers of the non-.NET consumer report problems to me.

    Read the article

  • Spring data mapping problem.

    - by Yashwant Chavan
    Hi, I am using spring and hibernate along with my different components There is date field in DB as contract_end_date as a Date , so my pojo also contains date getter setter for contract_end_date, but when i submit form to Multiaction controller it gives data bindding exception for contract_end_date. It trying to search string getter setter for contract_end_date. So is there is any solution to handle this kind of problem. This is my pojo. after sumitting the form getting data binding exception public class Clnt implements java.io.Serializable { private String clntId; private String clntNm; private String busUnitNm; private String statCd; private String cmntTx; private Date contractEndDt; }

    Read the article

  • How do I detect server status in a port scanner java implementation

    - by akz
    I am writing a port scanner in Java and I want to be able to distinct the following 4 use cases: port is open port is open and server banner was read port is closed server is not live I have the following code: InetAddress address = InetAddress.getByName("google.com"); int[] ports = new int[]{21, 22, 23, 80, 443}; for (int i = 0; i < ports.length; i++) { int port = ports[i]; Socket socket = null; try { socket = new Socket(address, port); socket.setSoTimeout(500); System.out.println("port " + port + " open"); BufferedReader reader = new BufferedReader( new InputStreamReader(socket.getInputStream())); String line = reader.readLine(); if (line != null) { System.out.println(line); } socket.close(); } catch (SocketTimeoutException ex) { // port was open but nothing was read from input stream ex.printStackTrace(); } catch (ConnectException ex) { // port is closed ex.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { if (socket != null && !socket.isClosed()) { try { socket.close(); } catch (Exception e) { e.printStackTrace(); } } } } The problem is that I get a ConnectionException both when the port is closed and the server cannot be reached but with a different exception message: java.net.ConnectException: Connection timed out: connect when the connection was never established and java.net.ConnectException: Connection refused: connect when the port was closed so I cannot make the distinction between the two use cases without digging into the actual exception message. Same thing happens when I try a different approach for the socket creation. If I use: socket = new Socket(); socket.setSoTimeout(500); socket.connect(new InetSocketAddress(address, port), 1000); I have the same problem but with the SocketTimeoutException instead. I get a java.net.SocketTimeoutException: Read timed out if port was open but there was no banner to be read and java.net.SocketTimeoutException: connect timed out if server is not live or port is closed. Any ideas? Thanks in advance!

    Read the article

  • How to get the stream of a public Facebook fanpage in php?

    - by Bundy
    Hi, I want to display my public fanpage feed onto my website via the Facebook API without requiring a login. I'm doing this require_once('../includes/classes/facebook-platform/php/facebook.php'); $fb = new Facebook($api_key, $secret); $fb->api_client->stream_get('',$app_id,'0','0','','','','','')); But I get this error Fatal error: Uncaught exception 'FacebookRestClientException' with message 'user id parameter or session key required' in includes/classes/facebook-platform/php/facebookapi_php5_restlib.php:3065 Stack trace: #0 includes/classes/facebook-platform/php/facebookapi_php5_restlib.php(1915): FacebookRestClient->call_method('facebook.stream...', Array) #1 facebook/api.php(12): FacebookRestClient->stream_get('', 13156929019, '0', '0', 30, '', '', '', '') #2 {main} thrown in includes/classes/facebook-platform/php/facebookapi_php5_restlib.php on line 3065 Then I figured, because of 'user id parameter or session key required', to add my user id to the call require_once('../includes/classes/facebook-platform/php/facebook.php'); $fb = new Facebook($api_key, $secret); $fb->api_client->stream_get(502945616,13156929019,$app_id,'0','0','','','','','')); But then I got this error Fatal error: Uncaught exception 'FacebookRestClientException' with message 'Session key invalid or no longer valid' I'm totally clueless :)

    Read the article

  • C# xml Class to substitute ini files

    - by Eduardo
    Hi guys, I am learning Windows Forms in C#.NET 2008 and i want to build a class to work with SIMPLE xml files (config file like INI files), but i just need a simple class (open, getvalue, setvalue, creategroup, save and close functions), to substitute of ini files. I already did something and it is working but I am having trouble when I need to create different groups, something like this: <?xml version="1.0" encoding="utf-8"?> <CONFIG> <General> <Field1>192.168.0.2</Field1> </General> <Data> <Field1>Joseph</Field1> <Field2>Locked</Field2> </Data> </CONFIG> how can i specify that i want to read the field1 of [data] group? note that i have same field name in both groups (Field1)! I am using System.Linq, something like this: To open document: XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(FilePath); To save document: xmlDoc.Save(FilePath); To get value: public string getValue(string Field) { string result = ""; try { XmlNodeList xmlComum = xmlDoc.GetElementsByTagName(Field); if (xmlComum.Item(0) == null) result = ""; else result = xmlComum.Item(0).InnerText; } catch (Exception ex) { return ""; } return result; } To set value: public void setValue(string Group, string Field, string FieldValue) { try { XmlNodeList xmlComum = xmlDoc.GetElementsByTagName(Field); if (xmlComum.Item(0) == null) { xmlComum = xmlDoc.GetElementsByTagName(Group); if (xmlComum.Item(0) == null) { // create group createGroup(Group); xmlComum = xmlDoc.GetElementsByTagName(Group); } XmlElement xmlE = xmlDoc.CreateElement(Field); XmlText xmlT = xmlDoc.CreateTextNode(FieldValue); xmlE.AppendChild(xmlT); xmlComum.Item(0).AppendChild(xmlE); } else { // item already exists, just change its value xmlComum.Item(0).InnerText = Value; } xmlDoc.Save(FilePath); } catch (Exception ex) { } } The CreateGroup code: public void createGroup(string Group) { try { XmlElement xmlComum = xmlDoc.CreateElement(Group); xmlDoc.DocumentElement.AppendChild(xmlComum); xmlDoc.Save(FilePath); } catch (Exception ex) { } } Thank You!

    Read the article

  • TStringList and TThread that does not free all of its memory

    - by VanillaH
    Version used: Delphi 7. I'm working on a program that does a simple for loop on a Virtual ListView. The data is stored in the following record: type TList=record Item:Integer; SubItem1:String; SubItem2:String; end; Item is the index. SubItem1 the status of the operations (success or not). SubItem2 the path to the file. The for loop loads each file, does a few operations and then, save it. The operations take place in a TStringList. Files are about 2mb each. Now, if I do the operations on the main form, it works perfectly. Multi-threaded, there is a huge memory problem. Somehow, the TStringList doesn't seem to be freed completely. After 3-4k files, I get an EOutofMemory exception. Sometimes, the software is stuck to 500-600mb, sometimes not. In any case, the TStringList always return an EOutofMemory exception and no file can be loaded anymore. On computers with more memory, it takes longer to get the exception. The same thing happens with other components. For instance, if I use THTTPSend from Synapse, well, after a while, the software cannot create any new threads because the memory consumption is too high. It's around 500-600mb while it should be, max, 100mb. On the main form, everything works fine. I guess the mistake is on my side. Maybe I don't understand threads enough. I tried to free everything on the Destroy event. I tried FreeAndNil procedure. I tried with only one thread at a time. I tried freeing the thread manually (no FreeOnTerminate...) No luck. So here is the thread code. It's only the basic idea; not the full code with all the operations. If I remove the LoadFile prodecure, everything works good. A thread is created for each file, according to a thread pool. unit OperationsFiles; interface uses Classes, SysUtils, Windows; type TOperationFile = class(TThread) private Position : Integer; TPath, StatusMessage: String; FileStringList: TStringList; procedure UpdateStatus; procedure LoadFile; protected procedure Execute; override; public constructor Create(Path: String; LNumber: Integer); end; implementation uses Form1; procedure TOperationFile.LoadFile; begin try FileStringList.LoadFromFile(TPath); // Operations... StatusMessage := 'Success'; except on E : Exception do StatusMessage := E.ClassName; end; end; constructor TOperationFile.Create(Path : String; LNumber: Integer); begin inherited Create(False); TPath := Path; Position := LNumber; FreeOnTerminate := True; end; procedure TOperationFile.UpdateStatus; begin FileList[Position].SubItem1 := StatusMessage; Form1.ListView4.UpdateItems(Position,Position); end; procedure TOperationFile.Execute; begin FileStringList:= TStringList.Create; LoadFile; Synchronize(UpdateStatus); FileStringList.Free; end; end. What could be the problem? I thought at one point that, maybe, too many threads are created. If a user loads 1 million files, well, ultimately, 1 million threads is going to be created -- although, only 50 threads are created and running at the same time. Thanks for your input.

    Read the article

  • How can I return something other than an enum from an NServiceBus endpoint exposed as a WCF service?

    - by Todd Stout
    I have a service exposed as WCF via NServiceBus. Ultimately, I'd like to call to this service from silverlight. My WCF Service Interface looks like this: [ServiceContract] public interface ISettingsService { [OperationContract(Action = "http://tempuri.org/IWcfServiceOf_RequestSettingsMessage_SettingsResponseMessage/Process", ReplyAction = "http://tempuri.org/IWcfServiceOf_RequestSettingsMessage_SettingsResponseMessage/ProcessResponse") ] SettingsResponseMessage FetchSettings(RequestSettingsMessage request); } My NSB WCF service is defined as: public class CoreService : WcfService<RequestSettingsMessage, SettingsResponseMessage> { } When I invoke the FetchSettings method on the service, I get an exception: System.TypeInitializationException: The type initializer for 'NServiceBus.WcfSer vice`2' threw an exception. ---- System.InvalidOperationException: Centerlink.Services.Core.Msg.Settings.SettingsResponseMessage must be an enum representing error codes returned by the server. It seems that the WcfService< class is restricting the return type of a WCF method to be an enum. How can I have my service return something other than an enum? Do I need to create a custom implementation of NServiceBus.WcfService<?

    Read the article

  • Input string was not in correct format.

    - by jawahar-sync
    Hi Experts, I had a Ribbon like custom control. I created an application using this control. These applications work fine until I change the system number format. They crashes if I change the system number format like below: Current Format = English (United State) Decimal symbol = ',' Digit group symbol = '.' When I run applications, they throw an exception "Input string not in Correct format". . Some other applications specify the Exception's message = "Input string '0,2,0,2' was not a correct format", so I think in Wpf ES's xaml files, we may declare some properties i.e Padding, Margin like "0,2,0,2" = that will cause errors with the system number format above. I have note that this error only occurs in Windows Vista, it does not occurs on Windows XP. I do not know why? I have also look at this link, But it not helps for Vista. http://support.microsoft.com/kb/968227/en-us

    Read the article

  • LINQ to SQl updating primary key field?

    - by Curtis White
    I have a linq to sql table/class that uses a GUID as both a primary key and as foreign key. This problem came up when factoring some code that previously worked. The exception generated is "Operation is not valid due to the current state of the object." The process I use is as such: aspnet_User user() = new aspnet_User(); aspnet_user.childTable = new childTable(); .. set some properties user.Insert() -> my custom method ... @ my custom method using (mycontext dc = new context() ) { user.childTable.ID = (Guid)myNewlyCreatedGuid; } The exception occurs on the assignment childTable.set_UserId().

    Read the article

  • Enums With Default Throw Clause?

    - by Tom Tresansky
    I noticed the following in the Java Language spec in the section on enumerations here: link switch(this) { case PLUS: return x + y; case MINUS: return x - y; case TIMES: return x * y; case DIVIDE: return x / y; } throw new AssertionError("Unknown op: " + this); However, looking at the switch statement definition section, I didn't notice this particular syntax (the associated throw statement) anywhere. Can I use this sort of "default case is throw an exception" syntactic sugar outside of enum definitions? Does it have any special name? Is this considered a good/bad practice for short-cutting this behavior of "anything not in the list throws an exception"?

    Read the article

  • how to show image from ms access to jpanel in java netbeans

    - by Shiv
    I have used this code : private void okActionPerformed(java.awt.event.ActionEvent evt) { try { String Update = name.getText(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection connection = DriverManager.getConnection("jdbc:odbc:NewPData"); PreparedStatement psmnt = connection.prepareStatement("SELECT Image FROM Table1 where Name='" + Update + "'"); ResultSet rs = psmnt.executeQuery(); Blob blob = rs.getBlob("Image"); int b; InputStream bis = rs.getBinaryStream("Image"); FileOutputStream f = new FileOutputStream("Image.jpg"); while ((b = bis.read()) >= 0) { f.write(b); } f.close(); bis.close(); icon = new ImageIcon(blob.getBytes(1L, (int) blob.length())); lblImage.setIcon(icon); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } Exception it show is java.lang.UnsupportedOperationException i have stored image first in ms access and now i want to show it on a label plz help

    Read the article

  • Boost::asio bug in MSVC10 - Failing BOOST_WORKAROUND in ~buffer_debug_check() in buffer.hpp

    - by shaz
    A straight compilation of example http://www.boost.org/doc/libs/1_43_0/doc/html/boost_asio/tutorial/tutdaytime3/src.html results in a runtime null pointer exception. Stack trace points to the buffer_debug_check destructor which contains this comment: // MSVC's string iterator checking may crash in a std::string::iterator // object's destructor when the iterator points to an already-destroyed // std::string object, unless the iterator is cleared first. The test #if BOOST_WORKAROUND(BOOST_MSVC, = 1400) succeeds in MSVC10 and (but) results in a null pointer exception in c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility line 123 _Iterator_base12& operator=(const _Iterator_base12& _Right) { // assign an iterator if (_Myproxy != _Right._Myproxy) _Adopt(_Right._Myproxy->_Mycont); return (*this); } _Right._Myproxy is NULL

    Read the article

  • Showing custom model validation exceptions in the Django admin site.

    - by Guy Bowden
    I have a booking model that needs to check if the item being booked out is available. I would like to have the logic behind figuring out if the item is available centralised so that no matter where I save the instance this code validates that it can be saved. At the moment I have this code in a custom save function of my model class: def save(self): if self.is_available(): # my custom check availability function super(MyObj, self).save() else: # this is the bit I'm stuck with.. raise forms.ValidationError('Item already booked for those dates') This works fine - the error is raised if the item is unavailable, and my item is not saved. I can capture the exception from my front end form code, but what about the Django admin site? How can I get my exception to be displayed like any other validation error in the admin site?

    Read the article

< Previous Page | 164 165 166 167 168 169 170 171 172 173 174 175  | Next Page >