100+ results results for 'ERROR repo:dabomb69/bash-portable' (610 ms)
30{ \ 31 if (!aDefaultArgs) return NS_ERROR_FAILURE; \ 32 *aDefaultArgs = ToNewUnicode(nsDependentCString(macro_default_args)); \ 37{ \ 38 if (!aChromeUrlForTask) return NS_ERROR_FAILURE; \ 39 *aChromeUrlForTask = PL_strdup(macro_chrome_url); \ 44{ \ 45 if (!aCommandLineArgument) return NS_ERROR_FAILURE; \ 46 *aCommandLineArgument = PL_strdup(macro_cmd_line_arg); \ 50{ \ 51 if (!aPrefNameForStartup) return NS_ERROR_FAILURE; \ 52 *aPrefNameForStartup = PL_strdup(macro_pref_name); \ 56{ \ 57 if (!aHelpText) return NS_ERROR_FAILURE; \ 58 *aHelpText = PL_strdup(macro_help_text); \MessageProcessor.java git://github.com/lmco/eurekastreams.git | Java | 337 lines
153 * @throws MessagingException 154 * On error. 155 * @throws IOException 155 * @throws IOException 156 * On error. 157 */ 264 // notify user on failure 265 // Note: A response is only sent for errors processing the action (which could be due to missing content 266 // from the message). This is because any errors encountered prior represent a bad sender or ill-formed 280 * @throws MessagingException 281 * On error. 282 */ 300 * @throws MessagingException 301 * On error. 302 */ErrorData.html http://xformsdb.googlecode.com/svn/trunk/ | HTML | 342 lines
96<P> 97Contains information about an error, for error pages. 98 The information contained in this instance is meaningless if not used 98 The information contained in this instance is meaningless if not used 99 in the context of an error page. To indicate a JSP is an error page, 100 the page author must set the isErrorPage attribute of the page directive 107 <DD>2.0</DD> 108<DT><B>See Also:</B><DD><A HREF="../../../javax/servlet/jsp/PageContext.html#getErrorData()"><CODE>PageContext.getErrorData()</CODE></A></DL> 109<HR> 126<TR BGCOLOR="white" CLASS="TableRowColor"> 127<TD><CODE><B><A HREF="../../../javax/servlet/jsp/ErrorData.html#ErrorData(java.lang.Throwable, int, java.lang.String, java.lang.String)">ErrorData</A></B>(java.lang.Throwable throwable, 128 int statusCode, 212<P> 213<DT><B>Parameters:</B><DD><CODE>throwable</CODE> - The Throwable that is the cause of the error<DD><CODE>statusCode</CODE> - The status code of the error<DD><CODE>uri</CODE> - The request URI<DD><CODE>servletName</CODE> - The name of the servlet invoked</DL> 214__init__.py https://bitbucket.org/birkenfeld/sphinx/ | Python | 351 lines
18from sphinx import package_dir 19from sphinx.errors import PycodeError 20from sphinx.pycode import nodes 188 except Exception as err: 189 raise PycodeError('error opening %r' % filename, err) 190 obj = cls(fileobj, modname, filename) 197 entry = cls.cache['module', modname] 198 if isinstance(entry, PycodeError): 199 raise entry 207 obj = cls.for_file(source, modname) 208 except PycodeError as err: 209 cls.cache['module', modname] = err 250 self.tokens = list(tokenize.generate_tokens(self.source.readline)) 251 except tokenize.TokenError as err: 252 raise PycodeError('tokenizing failed', err)KhorosToMatLab.old git://github.com/aludnam/MATLAB.git | Perl | 452 lines
278 print "elseif nargin ==2\n Inputs=varargin{1}; arglist=varargin{2};\n"; 279 print "else error('Usage: [out1,..] = k$fname(Inputs,arglist).');\nend\n"; 280 } 285 print "elseif nargin ==1\n arglist=varargin{1};\n"; 286 print "else error('Usage: [out1,..] = k$fname(arglist).');\nend\n"; 287 } 287 } 288print "if size(arglist,2)~=2\n error('arglist must be of form {''ParameterTag1'',value1;''ParameterTag2'',value2}')\n end\n"; 289 342 if (nextinput > length(Inputs)) 343 error(['Input ' narglist{jj,1} ' has no corresponding input!']); 344 end 348 if (nextoutput > nargout) 349 error(['Output nr. ' narglist{jj,1} ' is not present in the assignment list of outputs !']); 350 endnsISHistory.h http://firefox-mac-pdf.googlecode.com/svn/trunk/ | C Header | 313 lines
94 * the index is obtained successfully. 95 * <code>NS_ERROR_FAILURE</code> Error in obtaining 96 * history entry for the given index. 112 * @throws <code>NS_SUCCESS_LOSS_OF_INSIGNIFICANT_DATA</code> Purge was vetod. 113 * @throws <code>NS_ERROR_FAILURE</code> numEntries is 114 * invalid or out of bounds with the size of history. 206#define NS_FORWARD_SAFE_NSISHISTORY(_to) \ 207 NS_SCRIPTABLE NS_IMETHOD GetCount(PRInt32 *aCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCount(aCount); } \ 208 NS_SCRIPTABLE NS_IMETHOD GetIndex(PRInt32 *aIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIndex(aIndex); } \ 208 NS_SCRIPTABLE NS_IMETHOD GetIndex(PRInt32 *aIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIndex(aIndex); } \ 209 NS_SCRIPTABLE NS_IMETHOD GetRequestedIndex(PRInt32 *aRequestedIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestedIndex(aRequestedIndex); } \ 210 NS_SCRIPTABLE NS_IMETHOD GetMaxLength(PRInt32 *aMaxLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMaxLength(aMaxLength); } \ 210 NS_SCRIPTABLE NS_IMETHOD GetMaxLength(PRInt32 *aMaxLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMaxLength(aMaxLength); } \ 211 NS_SCRIPTABLE NS_IMETHOD SetMaxLength(PRInt32 aMaxLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMaxLength(aMaxLength); } \ 212 NS_SCRIPTABLE NS_IMETHOD GetEntryAtIndex(PRInt32 index, PRBool modifyIndex, nsIHistoryEntry **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEntryAtIndex(index, modifyIndex, _retval); } \nsIDOMHTMLAppletElement.h http://firefox-mac-pdf.googlecode.com/svn/trunk/ | C Header | 309 lines
138#define NS_FORWARD_SAFE_NSIDOMHTMLAPPLETELEMENT(_to) \ 139 NS_SCRIPTABLE NS_IMETHOD GetAlign(nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlign(aAlign); } \ 140 NS_SCRIPTABLE NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } \ 140 NS_SCRIPTABLE NS_IMETHOD SetAlign(const nsAString & aAlign) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlign(aAlign); } \ 141 NS_SCRIPTABLE NS_IMETHOD GetAlt(nsAString & aAlt) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlt(aAlt); } \ 142 NS_SCRIPTABLE NS_IMETHOD SetAlt(const nsAString & aAlt) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlt(aAlt); } \ 142 NS_SCRIPTABLE NS_IMETHOD SetAlt(const nsAString & aAlt) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlt(aAlt); } \ 143 NS_SCRIPTABLE NS_IMETHOD GetArchive(nsAString & aArchive) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetArchive(aArchive); } \ 144 NS_SCRIPTABLE NS_IMETHOD SetArchive(const nsAString & aArchive) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetArchive(aArchive); } \ 144 NS_SCRIPTABLE NS_IMETHOD SetArchive(const nsAString & aArchive) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetArchive(aArchive); } \ 145 NS_SCRIPTABLE NS_IMETHOD GetCode(nsAString & aCode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCode(aCode); } \ 146 NS_SCRIPTABLE NS_IMETHOD SetCode(const nsAString & aCode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCode(aCode); } \ 146 NS_SCRIPTABLE NS_IMETHOD SetCode(const nsAString & aCode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCode(aCode); } \ 147 NS_SCRIPTABLE NS_IMETHOD GetCodeBase(nsAString & aCodeBase) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCodeBase(aCodeBase); } \ 148 NS_SCRIPTABLE NS_IMETHOD SetCodeBase(const nsAString & aCodeBase) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCodeBase(aCodeBase); } \CGIHTTPServer.py https://bitbucket.org/pypy/pypy/ | Python | 378 lines
148 if not (self.have_fork or self.have_popen2 or self.have_popen3): 149 self.send_error(403, "CGI script is not a Python script (%r)" % 150 scriptname) 152 if not self.is_executable(scriptfile): 153 self.send_error(403, "CGI script is not executable (%r)" % 154 scriptname) 247 os.setuid(nobody) 248 except os.error: 249 pass 253 except: 254 self.server.handle_error(self.request, self.client_address) 255 os._exit(127) 272 nbytes = int(length) 273 except (TypeError, ValueError): 274 nbytes = 0JavaAction.java https://svn.apache.org/repos/asf/incubator/isis/ | Java | 0 lines
120 if (parameters.length != paramCount) { 121 LOG.error(actionMethod + " requires " + paramCount + " parameters, not " + parameters.length); 122 } 175 if (parameterSet.length != paramCount) { 176 LOG.error(actionMethod + " requires " + paramCount + " parameters, not " + parameterSet.length); 177 }javaw.py https://code.google.com/p/waf/ | Python | 475 lines
29import os, re, tempfile, shutil 30from waflib import TaskGen, Task, Utils, Options, Build, Errors, Node, Logs 31from waflib.Configure import conf 229 except Exception: 230 raise Errors.WafError('Could not find the basedir %r for %r' % (self.basedir, self)) 231 return super(jar_create, self).runnable_status()medici.erl git://github.com/evanmiller/ChicagoBoss.git | Erlang | 0 lines
44 45%% @spec start() -> {ok, Pid} | Error:term() 46%% 50 51%% @spec start(StartupOptions::proplist()) -> {ok, Pid} | Error:term() 52%% 276 ?assert(?MODULE:get(<<"putkeep1">>) =:= <<"foo">>), 277 ?assertMatch({error, _}, ?MODULE:putkeep(<<"putkeep1">>, <<"bar">>)), 278 ?assert(?MODULE:get(<<"putkeep1">>) =:= <<"foo">>), % no effect if key already exists before putkeep 301 ok = ?MODULE:out(<<"out1">>), 302 ?assertMatch({error, _}, ?MODULE:get(<<"out1">>)). 303 322 ok = ?MODULE:vanish(), 323 ?assertMatch({error, _}, ?MODULE:get(<<"vanish1">>)). 324XcmsAllocNamedColor.m git://anongit.freedesktop.org/git/xorg/test/xts.git/ | Objective C | 0 lines
138 * Turn on buffering and buffer parameter information 139 * in case an error occurs 140 ******/ 145 message(fmtstr, fmt_lst, 0); 146 (void)strcpy(fmtstr, "An error occurred during a call to %s\n\n"); 147 fmt_lst[0].typ_str = TestName; 161 162 bufrdisp(display); /* buffer display struct info for error checking */ 163 179 180 first_error = 0; /* no errors encountered yet */ 181/****** 186 errflg = 0; 187 XSetErrorHandler(signal_status); 188 svc_ret_value = XcmsAllocNamedColor(libdivecomputer.c git://github.com/torvalds/subsurface.git | C | 482 lines
24 25static GError *error(const char *fmt, ...) 26{ 27 va_list args; 28 GError *error; 29 30 va_start(args, fmt); 31 error = g_error_new_valist( 32 g_quark_from_string("subsurface"), 32 g_quark_from_string("subsurface"), 33 DIVE_ERROR_PARSE, fmt, args); 34 va_end(args); 34 va_end(args); 35 return error; 36}doc.py https://bitbucket.org/mirror/django/ | Python | 347 lines
122 view_func = getattr(__import__(mod, '', '', ['']), func) 123 except (ImportError, AttributeError): 124 raise Http404 249def missing_docutils_page(request): 250 """Display an error message for people without docutils""" 251 return render_to_response('admin_doc/missing_docutils.html') 323 else: 324 raise TypeError, "%s does not appear to be a urlpattern object" % p 325 return viewssites.py https://bitbucket.org/mirror/django/ | Python | 350 lines
16 17ERROR_MESSAGE = ugettext_lazy("Please enter a correct username and password. Note that both fields are case-sensitive.") 18LOGIN_FORM_KEY = 'this_is_the_login_form' 158 admin_obj = self._registry[model] 159 except KeyError: 160 raise http.Http404("This model exists but has not been registered with the admin site.") 232 if user is None: 233 message = ERROR_MESSAGE 234 if u'@' in username: 265 else: 266 return self.display_login_form(request, ERROR_MESSAGE) 267 login = never_cache(login) 337 'post_data': post_data, 338 'error_message': error_message, 339 'root_path': self.root_path,CompositeDependencyHandler.cs https://hg01.codeplex.com/clientdependency | C# | 0 lines
98 //retry up to 5 times... this is only here due to a bug found in another website that was returning a blank 99 //result. To date, it can't be replicated in VS, but we'll leave it here for error handling support... can't hurt 100 for (int i = 0; i < 5; i++) 105 106 ClientDependencySettings.Instance.Logger.Error(string.Format("No bytes were returned, this is attempt {0}. Fileset: {1}, Type: {2}, Version: {3}", i, fileset, type, version), null); 107 } 225 { 226 ClientDependencySettings.Instance.Logger.Error("ClientDependency handler path is null", new Exception()); 227 return;MembershipRequestServiceHttp.java git://github.com/liferay/liferay-portal.git | Java | 229 lines
89 90 _log.error(systemException, systemException); 91 125 126 _log.error(systemException, systemException); 127 166 167 _log.error(systemException, systemException); 168 205 206 _log.error(systemException, systemException); 207TikaRawMetadataProcessor.java git://github.com/liferay/liferay-portal.git | Java | 255 lines
230 else { 231 _log.error(exception, exception); 232 }BaseServiceRemote.java http://tauruss.googlecode.com/svn/trunk/ | Java | 265 lines
99 } catch (Exception e) { 100 log.error(e); 101 }dbmechanic.py http://dbsprockets.googlecode.com/svn/trunk/ | Python | 162 lines
15from dbsprockets.sprockets import Sprockets 16#from dbsprockets.decorators import crudErrorCatcher, validate 17from tw.api import WidgetBunch 138 # @validate(error_handler=editRecord) 139 #@crudErrorCatcher(errorType=sqlalchemy.exceptions.IntegrityError, error_handler='editRecord') 140 #@crudErrorCatcher(errorType=sqlalchemy.exceptions.ProgrammingError, error_handler='editRecord') 148 # @validate(error_handler=addRecord) 149 #@crudErrorCatcher(errorType=sqlalchemy.exceptions.IntegrityError, error_handler='addRecord') 150 #@crudErrorCatcher(errorType=sqlalchemy.exceptions.ProgrammingError, error_handler='addRecord')PHPParserTester.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 350 lines
59 checkPHP("$link= mysql_connect($this->mysqlHost, $this->mysqlUser, $this->mysqlPassword)\n" + 60 "or $errMsg= 'Could not connect: ' . mysql_error();"); 61 checkPHP("function method(array $array) {\n}"); 136 checkPHP("unset($this->blockvariables[$block][$varname]);"); 137 checkPHP("new IT_Error(\"The block '$block' was not found in the template.\", __FILE__, __LINE__);"); 138 checkPHP("for ($i=156, $j=0; $i<512; $i++, $j++) $v_checksum += ord(substr($v_binary_data_last,$j,1));"); 182 checkPHP("$ol = new Overlib();"); 183 checkPHP("$risultato = mysql_query($sql) or\n die(mysql_error());"); 184 checkHTML("\n\n\n\n <?php print \"Hello world\" ?>"); 263 } 264 catch (Error e) 265 { 325 326 public void parseError(PHPParseErrorEvent e) 327 {SpellCheckPlugin.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 414 lines
160 { 161 Log.log(Log.ERROR, SpellCheckPlugin.class, "Error spell checking (Aspell)."); 162 Log.log(Log.ERROR, SpellCheckPlugin.class, e); 235 { 236 Log.log(Log.ERROR, SpellCheckPlugin.class, "Error spell checking (Aspell)."); 237 Log.log(Log.ERROR, SpellCheckPlugin.class, e); 282 private static 283 ErrorListSpellChecker getErrorListSpellChecker() 284 { 291 if( _errorListSpellChecker == null ) 292 _errorListSpellChecker = new ErrorListSpellChecker( aspellExeFilename, aspellCommandLine ); 293 else 297 _errorListSpellChecker.stop(); 298 _errorListSpellChecker = new ErrorListSpellChecker( aspellExeFilename, aspellCommandLine ); 299 }subqueries.py https://bitbucket.org/mirror/django/ | Python | 368 lines
5from django.contrib.contenttypes import generic 6from django.core.exceptions import FieldError 7from django.db.models.sql.constants import * 205 if not direct or m2m: 206 raise FieldError('Cannot update model field %r (only non-relations and foreign keys permitted).' % field) 207 values_seq.append((field, model, val)) 240 self.related_updates[model].append((column, value, placeholder)) 241 except KeyError: 242 self.related_updates[model] = [(column, value, placeholder)]tests.py https://bitbucket.org/mirror/django/ | Python | 346 lines
22 import decimal 23except ImportError: 24 from django.utils import _decimal as decimalBuildLogger.html http://xformsdb.googlecode.com/svn/trunk/ | HTML | 312 lines
128<CODE> void</CODE></FONT></TD> 129<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/BuildLogger.html#setErrorPrintStream(java.io.PrintStream)">setErrorPrintStream</A></B>(java.io.PrintStream err)</CODE> 130 131<BR> 132 Sets the output stream to which this logger is to send error messages.</TD> 133</TR> 237 238<A NAME="setErrorPrintStream(java.io.PrintStream)"><!-- --></A><H3> 239setErrorPrintStream</H3> 240<PRE> 241public void <B>setErrorPrintStream</B>(java.io.PrintStream err)</PRE> 242<DL> 242<DL> 243<DD>Sets the output stream to which this logger is to send error messages. 244<P>options.py https://bitbucket.org/mirror/django/ | Python | 285 lines
57 if meta_attrs != {}: 58 raise TypeError, "'class Meta' got invalid attribute(s): %s" % ','.join(meta_attrs.keys()) 59 else: 99 def get_field(self, name, many_to_many=True): 100 "Returns the requested field by name. Raises FieldDoesNotExist on error." 101 to_search = many_to_many and (self.fields + self.many_to_many) or self.fields 109 if model is None: 110 raise ReferenceError("Model no longer available in %s" % self) 111 return model._default_manager 130 return self._all_related_objects 131 except AttributeError: 132 rel_objs = [] 164 return self._all_related_many_to_many_objects 165 except AttributeError: 166 rel_objs = []SubversionResolver.cs https://sourceserversharp.svn.codeplex.com/svn | C# | 0 lines
135 psi.RedirectStandardOutput = true; 136 psi.RedirectStandardError = true; 137 psi.RedirectStandardInput = true; 155 156 // Check if the volume exists; if not 'svn status' returns "svn: Error resolving case of 'q:\q'" 157 string root = Path.GetPathRoot(file.Key); 181 p.StandardInput.Close(); 182 p.ErrorDataReceived += new DataReceivedEventHandler(svnStatus_ErrorDataReceived); 183 p.OutputDataReceived += new DataReceivedEventHandler(svnStatus_OutputDataReceived); 184 _svnStatusOutput = new StringBuilder(); 185 _receivedError = false; 186 p.BeginErrorReadLine(); 191 _svnStatusOutput = null; 192 //string errs = p.StandardError.ReadToEnd(); 193HtmlHelper.cs git://github.com/mono/mono.git | C# | 281 lines
28 29 public static readonly string ValidationInputCssClassName = "input-validation-error"; 30 public static readonly string ValidationMessageCssClassName = "field-validation-error"; 30 public static readonly string ValidationMessageCssClassName = "field-validation-error"; 31 public static readonly string ValidationSummaryCssClassName = "validation-summary-errors"; 32nsIController.h https://hg01.codeplex.com/kmbrasil | C Header | 0 lines
59#define NS_FORWARD_SAFE_NSICONTROLLER(_to) \ 60 NS_IMETHOD IsCommandEnabled(const char *command, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsCommandEnabled(command, _retval); } \ 61 NS_IMETHOD SupportsCommand(const char *command, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SupportsCommand(command, _retval); } \ 61 NS_IMETHOD SupportsCommand(const char *command, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SupportsCommand(command, _retval); } \ 62 NS_IMETHOD DoCommand(const char *command) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoCommand(command); } \ 63 NS_IMETHOD OnEvent(const char *eventName) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnEvent(eventName); } 99{ 100 return NS_ERROR_NOT_IMPLEMENTED; 101} 105{ 106 return NS_ERROR_NOT_IMPLEMENTED; 107} 111{ 112 return NS_ERROR_NOT_IMPLEMENTED; 113}ExpatReaderWrapper.java http://androjena.googlecode.com/svn/trunk/ | Java | 425 lines
30import org.xml.sax.EntityResolver; 31import org.xml.sax.ErrorHandler; 32import org.xml.sax.InputSource; 95 if (mapping == null) 96 throwException("internal error"); 97 if (mapping.next == null) 293 @Override 294 public ErrorHandler getErrorHandler() { 295 return expatReader.getErrorHandler(); 350 @Override 351 public void setErrorHandler(ErrorHandler handler) { 352 expatReader.setErrorHandler(handler);resman.py http://migrid.googlecode.com/svn/trunk/ | Python | 299 lines
66 if not validate_status: 67 return (accepted, returnvalues.CLIENT_ERROR) 68suspend.php http://creative-portal.googlecode.com/svn/trunk/ | PHP | 297 lines
66 $save = $nv_Request->get_int( 'save', 'post', 0 ); 67 $error = ""; 68 if ( $save ) 74 { 75 $error = sprintf( $lang_module['susp_reason_empty'], $row_user['username'] ); 76 } 154 { 155 nv_info_die( $lang_global['error_info_caption'], $lang_global['site_info'], $lang_global['error_sendmail_admin'], 1 ); 156 } 167 168 $contents['change_suspend']['new_suspend_caption'] = ( ! empty( $error ) ) ? $error : $lang_module['chg_is_suspend' . $new_suspend]; 169 $contents['change_suspend']['new_suspend_is_error'] = ( ! empty( $error ) ) ? 1 : 0; 264{ 265 $class = ( $contents['change_suspend']['new_suspend_is_error'] ) ? " class=\"error\"" : ""; 266 $xtpl->assign( 'CLASS', ( $contents['change_suspend']['new_suspend_is_error'] ) ? " class=\"error\"" : "" );users_controller_spec.rb http://mobicents.googlecode.com/svn/trunk/ | Ruby | 412 lines
193 194 it "should set an error message in the flash if the user's profile is not complete'" do 195 @current_user.stub!(:profile_complete?).and_return(false) 196 get :edit 197 flash[:error].should_not be_blank 198 end 199 200 it "should NOT set an error message in the flash if the user's profile is not complete'" do 201 @current_user.stub!(:profile_complete?).and_return(true) 202 get :edit 203 flash[:error].should be_blank 204 end 355 356 it "should have a status of :error if the credentials are not valid" do 357 @client.should_receive(:attempt).with(:valid_credentials?, false).and_return(false)bodycontent-inc.php http://ebpls.googlecode.com/svn/trunk/ | PHP | 444 lines
2/*Modification History: 32008.04.25: Change constants to strings to remove PHP errors in log lines 99+ line 461?? 4*/keys.rb git://github.com/jnunemaker/mongomapper.git | Ruby | 469 lines
120 attrs['_type'] ? attrs['_type'].constantize : self 121 rescue NameError 122 selfBshScriptEngine.java http://beanshell2.googlecode.com/svn/trunk/ | Java | 381 lines
92 // explicit parsing error 93 throw new ScriptException(e.toString(), e.getErrorSourceFile(), e.getErrorLineNumber()); 94 } catch (TargetError e) { 96 // set it as the cause ? 97 ScriptException se = new ScriptException(e.toString(), e.getErrorSourceFile(), e.getErrorLineNumber()); 98 se.initCause(e.getTarget()); 198 private ScriptException constructScriptException(final EvalError e) { 199 return new ScriptException(e.getMessage(), e.getErrorSourceFile(), e.getErrorLineNumber()); 200 } 270 // set it as the cause ? 271 ScriptException se = new ScriptException(e.toString(), e.getErrorSourceFile(), e.getErrorLineNumber()); 272 se.initCause(e.getTarget()); 275 // The script couldn't be evaluated properly 276 throw new ScriptException(e.toString(), e.getErrorSourceFile(), e.getErrorLineNumber()); 277 } catch (InterpreterError e) {context.ipp http://hadesmem.googlecode.com/svn/trunk/ | C++ Header | 0 lines
203 { 204 ec = boost::system::error_code(::ERR_get_error(), 205 boost::asio::error::get_ssl_category()); 305 { 306 ec = boost::system::error_code(::ERR_get_error(), 307 boost::asio::error::get_ssl_category()); 344 { 345 ec = boost::system::error_code(::ERR_get_error(), 346 boost::asio::error::get_ssl_category()); 384 { 385 ec = boost::system::error_code(::ERR_get_error(), 386 boost::asio::error::get_ssl_category()); 423 { 424 ec = boost::system::error_code(::ERR_get_error(), 425 boost::asio::error::get_ssl_category());headers.html http://hadesmem.googlecode.com/svn/trunk/ | HTML | 0 lines
56 57div.admonition, div.attention, div.caution, div.danger, div.error, 58div.hint, div.important, div.note, div.tip, div.warning { 69div.attention p.admonition-title, div.caution p.admonition-title, 70div.danger p.admonition-title, div.error p.admonition-title, 71div.warning p.admonition-title {install.php https://code.google.com/p/osclass/ | PHP | 253 lines
21 22error_reporting(E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_PARSE); 23 41require_once LIB_PATH . 'osclass/helpers/hDefines.php'; 42require_once LIB_PATH . 'osclass/helpers/hErrors.php'; 43require_once LIB_PATH . 'osclass/helpers/hLocale.php'; 86 $message = __("Looks like you've already installed OSClass. To reinstall please clear your old database tables first."); 87 osc_die('OSClass » Error', $message) ; 88} 219 } elseif($step == 3) { 220 if( !isset($error["error"]) ) { 221 display_target(); 222 } else { 223 display_database_error($error, ($step - 1)); 224 }test_weakset.py https://bitbucket.org/pypy/pypy/ | Python | 382 lines
53 def test_new_or_init(self): 54 self.assertRaises(TypeError, WeakSet, [], 2) 55 65 self.assertEqual(c in self.s, c in self.d) 66 # 1 is not weakref'able, but that TypeError is caught by __contains__ 67 self.assertNotIn(1, self.s) 78 self.assertEqual(type(u), WeakSet) 79 self.assertRaises(TypeError, self.s.union, [[]]) 80 for C in set, frozenset, dict.fromkeys, list, tuple: 114 self.assertEqual(type(i), WeakSet) 115 self.assertRaises(TypeError, self.s.difference, [[]]) 116 127 self.assertEqual(type(i), WeakSet) 128 self.assertRaises(TypeError, self.s.symmetric_difference, [[]]) 129File.as http://buddypress-media.googlecode.com/svn/bp_media/trunk/ | ActionScript | 422 lines
166 // Delegate upload IO errors 167 file._fileRef.addEventListener(IOErrorEvent.IO_ERROR, function(e:IOErrorEvent):void { 168 dispatchEvent(e); 171 // Delegate secuirty errors 172 file._fileRef.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function(e:SecurityErrorEvent):void { 173 dispatchEvent(e); 263 // File load IO error 264 this._fileRef.addEventListener(IOErrorEvent.IO_ERROR, function(e:Event):void { 265 this.dispatchEvent(e); 333 // Delegate upload IO errors 334 urlStream.addEventListener(IOErrorEvent.IO_ERROR, function(e:IOErrorEvent):void { 335 file._chunk = file._chunks; // Cancel upload of all remaining chunks 339 // Delegate secuirty errors 340 urlStream.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function(e:SecurityErrorEvent):void { 341 file._chunk = file._chunks; // Cancel upload of all remaining chunksMefXapModuleTypeLoader.cs https://prism.svn.codeplex.com/svn | C# | 309 lines
75 76 private void RaiseLoadModuleCompleted(ModuleInfo moduleInfo, Exception error) 77 { 77 { 78 this.RaiseLoadModuleCompleted(new LoadModuleCompletedEventArgs(moduleInfo, error)); 79 } 219 220 Exception error = e.Error; 221 if (error == null) 236 { 237 error = ex; 238 } 242 { 243 this.RaiseLoadModuleCompleted(moduleInfo, error); 244 }DataTxTests.java http://hypergraphdb.googlecode.com/svn/trunk/ | Java | 0 lines
28 29 private ArrayList<Throwable> errors = new ArrayList<Throwable>(); 30 194 t.printStackTrace(System.err); 195 errors.add(t); 196 } 209 } 210 assertEquals(errors.size(), 0); 211 verifyData();CultureHelperHttpModule.cs https://hg01.codeplex.com/mojoportal | C# | 169 lines
19 { 20 application.Error += new EventHandler(this.Error); 21 application.BeginRequest += new EventHandler(BeginRequest); 51 // culture, but you should make sure that the resource file for the default culture 52 // has no missing keys or runtime errors could occur 53 87 { 88 log.Info("swallowed error in culture helper", ex); 89 } 91 { 92 log.Info("swallowed error in culture helper", ex); 93 } 120 //can happen in medium trust 121 log.Error(ex); 122 }home.php http://n-13news.googlecode.com/svn/trunk/ | PHP | 164 lines
60if(ini_get("register_globals")){ 61 echo "<div class=\"error-warning\">"; 62 echo $langmsg['home'][3]; 69 echo "<form method=\"post\" action=\"?\">"; 70 echo "<div class=\"error-warning\">"; 71 echo $langmsg['home'][4] . "<br /><br />" . $langmsg['home'][21]; 79 if(!@unlink("install/index.php")){ 80 echo "<span class=error>"; 81 echo $langmsg['home'][5];test_node_stream.py https://bitbucket.org/Stiivi/brewery/ | Python | 221 lines
49 50 self.assertRaises(KeyError, self.stream.connect, "sample", "unknown") 51 52 node = Node() 53 self.assertRaises(KeyError, self.stream.add, node, "sample") 54 194 195 self.assertRaisesRegexp(StreamRuntimeError, "This is fail node", stream.run) 196 200 stream.run() 201 except StreamRuntimeError, e: 202 handle = StringIO.StringIO() 219 220 self.assertRaises(StreamRuntimeError, stream.run) 221pack.c https://gnukeyring.svn.sourceforge.net/svnroot/gnukeyring | C | 243 lines
35 * 36 * ``May display a fatal error message if any of the following 37 * occur: [] You don t have write access to the database. [] 47 * 48 * TODO: Better error checking that e.g. we're not running past the 49 * end of the record. Display an error dialog rather than crashing. 159 errOut: 160 UI_ReportSysError2(ID_KeyDatabaseAlert, err, __FUNCTION__); 161 return err; 170 if (!recHandle) { 171 UI_ReportSysError2(ID_KeyDatabaseAlert, DmGetLastErr(), 172 __FUNCTION__); 194 fail: 195 UI_ReportSysError2(ID_KeyDatabaseAlert, err, __FUNCTION__); 196}Daemon.pm git://github.com/kraih/mojo.git | Perl | 542 lines
95 my $req = $tx->req; 96 if (my $error = $req->error) { $self->_debug($id, $error->{message}) } 97 110 $tx->res->headers->connection('close') 111 if ($c->{requests} || 1) >= $self->max_requests || $req->error; 112 156 # Close connection if necessary 157 return $self->_remove($id) if $tx->error || !$tx->keep_alive; 158 204 $stream->on(close => sub { $self && $self->_close($id) }); 205 $stream->on(error => 206 sub { $self && $self->app->log->error(pop) && $self->_close($id) });edit_expando.jsp git://github.com/liferay/liferay-portal.git | JavaServer Pages | 294 lines
70 71 <liferay-ui:error exception="<%= ColumnNameException.class %>" message="please-enter-a-valid-name" /> 72 <liferay-ui:error exception="<%= ColumnTypeException.class %>" message="please-select-a-valid-type" /> 72 <liferay-ui:error exception="<%= ColumnTypeException.class %>" message="please-select-a-valid-type" /> 73 <liferay-ui:error exception="<%= DuplicateColumnNameException.class %>" message="please-enter-a-unique-name" /> 74 <liferay-ui:error exception="<%= ValueDataException.class %>" message="please-enter-a-valid-value" />surfaces.c https://quake.svn.sourceforge.net/svnroot/quake | C | 463 lines
94 if (!front || !back) 95 Sys_Error ("SubdivideFace: didn't split the polygon"); 96 *prevptr = back; 286 if (hv->num == MAX_MAP_VERTS) 287 Sys_Error ("GetVertex: MAX_MAP_VERTS"); 288 hvert_p++; 291 if (bsp->numvertexes == MAX_MAP_VERTS) 292 Sys_Error ("numvertexes == MAX_MAP_VERTS"); 293 318 if (!f->contents[0]) 319 Sys_Error ("GetEdge: 0 contents"); 320 334 if (bsp->numedges == MAX_MAP_EDGES) 335 Sys_Error ("numedges == MAX_MAP_EDGES"); 336 edge.v[0] = v1;qfplist.c https://quake.svn.sourceforge.net/svnroot/quake | C | 496 lines
210 if (pl->pos >= pl->end) { 211 pl->error = "Reached end of string while parsing quoted string"; 212 return NULL; 340 if (key->type != QFString) { 341 pl->error = "Key is not a string"; 342 PL_FreeItem (key); 346 if (pl->ptr[pl->pos] != '=') { 347 pl->error = "Unexpected character (expected '=')"; 348 PL_FreeItem (key); 367 } else if (pl->ptr[pl->pos] != '}') { 368 pl->error = "Unexpected character (wanted ';' or '}')"; 369 PL_FreeItem (key); 489 } else { 490 if (pl && pl->error && pl->error[0]) 491 Sys_Error ("%d,%d: %s", pl->line, pl->pos, pl->error);models.py https://bitbucket.org/mirror/django/ | Python | 118 lines
1""" 226. A test to check that the model validator works can correctly identify errors in a model. 3""" 6 7class FieldErrors(models.Model): 8 charfield = models.CharField() 69 70error_log = """invalid_models.fielderrors: "charfield": CharFields require a "maxlength" attribute. 71invalid_models.fielderrors: "floatfield": FloatFields require a "decimal_places" attribute. 71invalid_models.fielderrors: "floatfield": FloatFields require a "decimal_places" attribute. 72invalid_models.fielderrors: "floatfield": FloatFields require a "max_digits" attribute. 73invalid_models.fielderrors: "filefield": FileFields require an "upload_to" attribute. 73invalid_models.fielderrors: "filefield": FileFields require an "upload_to" attribute. 74invalid_models.fielderrors: "prepopulate": prepopulate_from should be a list or tuple. 75invalid_models.fielderrors: "choices": "choices" should be either a tuple or list.securepyro.py http://migrid.googlecode.com/svn/trunk/ | Python | 240 lines
140 if not os.path.isfile(key_path): 141 raise ValueError("No such server key: %s" % key_path) 142 if not os.path.isfile(cert_path): 142 if not os.path.isfile(cert_path): 143 raise ValueError("No such server certificate: %s" % cert_path) 144 # requires m2crypto module, concatenated ssl key/cert and cacertREADME.markdown git://github.com/geofflane/grails-constraints.git | Markdown | 316 lines
761. false 772. A String which is used as the error message to show the user 783. A Collection with first element being message code, and following elements being message parameters 842. The target object being validated 853. The validation errors collection 86 87e.g. 88 def validate = { thePropertyValue, theTargetObject, errorsListYouProbablyWontEverNeed -> 89 return null != thePropertyValue && theTargetObject.rocks() 123### defaultMessageCode property (optional) ### 124The defaultMessageCode property defines the default key that will be used to look up the error message 125in the *grails-app/i18n/messages.properties* files. 132### failureCode property (optional) ### 133The failureCode property defines a key that can be used to lookup error messages in the *grails-app/i18n/messages.properties* files. 134The value of this property is appended to the end of the Class.property name that the Constraint is applied to.dateformat.py https://bitbucket.org/mirror/django/ | Python | 258 lines
49 "Swatch Internet time" 50 raise NotImplementedError 51WebsiteServiceHttp.java git://github.com/liferay/liferay-portal.git | Java | 273 lines
90 91 _log.error(systemException, systemException); 92 126 127 _log.error(systemException, systemException); 128 166 167 _log.error(systemException, systemException); 168 208 209 _log.error(systemException, systemException); 210 249 250 _log.error(systemException, systemException); 251gib_buffer.c https://quake.svn.sourceforge.net/svnroot/quake | C | 339 lines
170 "-----------------\n" 171 "|GIB Parse Error|\n" 172 "-----------------\n" 172 "-----------------\n" 173 "Parse error while adding text to GIB buffer.\n" 174 "Line %u: %s\n", 174 "Line %u: %s\n", 175 GIB_Buffer_Get_Line_Num (str, GIB_Parse_ErrorPos ()), 176 GIB_Parse_ErrorMsg () 202 "-----------------\n" 203 "|GIB Parse Error|\n" 204 "-----------------\n" 204 "-----------------\n" 205 "Parse error while inserting text into GIB buffer.\n" 206 "Line %u: %s\n",base.py https://bitbucket.org/mirror/django/ | Python | 231 lines
35 dot = middleware_path.rindex('.') 36 except ValueError: 37 raise exceptions.ImproperlyConfigured, '%s isn\'t a middleware module' % middleware_path 40 mod = import_module(mw_module) 41 except ImportError, e: 42 raise exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e) 44 mw_class = getattr(mod, mw_classname) 45 except AttributeError: 46 raise exceptions.ImproperlyConfigured, 'Middleware module "%s" does not define a "%s" class' % (mw_module, mw_classname) 70 request = self.request_class(request_env) 71 except UnicodeDecodeError: 72 response = http.HttpResponseBadRequest() 126 127 # Complain if the view returned None (a common error). 128 if response is None:export_import.jsp git://github.com/liferay/liferay-portal.git | JavaServer Pages | 248 lines
88 <liferay-ui:error exception="<%= LARTypeException.class %>" message="please-import-a-lar-file-of-the-correct-type" /> 89 <liferay-ui:error exception="<%= LayoutImportException.class %>" message="an-unexpected-error-occurred-while-importing-your-file" /> 90 93 <% 94 LocaleException le = (LocaleException)errorException; 95 %> 99 100 <liferay-ui:error exception="<%= NoSuchLayoutException.class %>" message="an-error-occurred-because-the-live-group-does-not-have-the-current-page" /> 101 <liferay-ui:error exception="<%= PortletIdException.class %>" message="please-import-a-lar-file-for-the-current-portlet" /> 102 103 <liferay-ui:error exception="<%= PortletDataException.class %>"> 104 134 <% 135 String errorMessageKey = StringPool.BLANK; 136pinet.h git://github.com/tito/Movid.git | C Header | 400 lines
45// 46// BSD-compatible socket error codes for Win32 47// 278 279 void error(ippeerinfo& peer, int code, const char* defmsg); 280 bool dopoll(int* i, int timeout); 331 332 void error(int code, const char* msg); 333 void open();EditCompanyAction.java git://github.com/liferay/liferay-portal.git | Java | 288 lines
30import com.liferay.portal.WebsiteURLException; 31import com.liferay.portal.kernel.servlet.SessionErrors; 32import com.liferay.portal.kernel.util.Constants; 80 81 if (!SessionErrors.isEmpty(actionRequest)) { 82 setForward( 94 if (e instanceof PrincipalException) { 95 SessionErrors.add(actionRequest, e.getClass()); 96 96 97 setForward(actionRequest, "portlet.portal_settings.error"); 98 } 116 117 SessionErrors.add( 118 actionRequest,gen_aircraft.ml git://github.com/pchickey/paparazzi-linux-release.git | OCaml | 280 lines
49 let other_name = Hashtbl.find ids id in 50 failwith (sprintf "Error: A/C Id '%s' duplicated in %s (%s and %s)" id conf_xml name other_name) 51 end; 53 let other_id = Hashtbl.find names name in 54 failwith (sprintf "Error: A/C name '%s' duplicated in %s (ids %s and %s)" name conf_xml id other_id) 55 end;d_sprite.c https://quake.svn.sourceforge.net/svnroot/quake | C | 419 lines
125 else if (snext < 8) 126 snext = 8; // prevent round-off error on <0 127 // steps from 134 else if (tnext < 8) 135 tnext = 8; // guard against round-off error on 136 // <0 steps 153 else if (snext < 8) 154 snext = 8; // prevent round-off error on <0 steps 155 // from from causing overstepping & 161 else if (tnext < 8) 162 tnext = 8; // guard against round-off error on 163 // <0 stepsPlugin.pm git://github.com/mdxp/cookbooks.git | Perl | 450 lines
39 40my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4); 41 77 78# nagios_exit("CODE", "error string") 79sub nagios_exit 83 $code ||= "UNKNOWN"; 84 die "invalid code '$code'" unless exists $ERRORS{$code}; 85 if ($errstr && $errstr ne '1') { 90 } 91 exit $ERRORS{$code}; 92} 396 397Sometimes on error or warning you want to return more than just the 398error cases in the returned text. You can do this by passing abuildcfg.h https://bitbucket.org/knoss/pcmanager/ | C++ Header | 427 lines
28#ifdef _WINDOWS_ 29#error "include buildcfg.h before include all other files" 30#endifeee.c http://eeepc-linux.googlecode.com/svn/trunk/ | C | 462 lines
22 * WARNING: This is an extremely *experimental* module! This code has been 23 * developed through trial-and-error, which means I don't really understand 24 * 100% what's going on here... That means there's a chance that there could 427 428 /* We had an error, so cleanup all of the proc files... */ 429proc_init_cleanup:SynHighlighterManager.pas http://gedemin.googlecode.com/svn/trunk/ | Pascal | 480 lines
71 component palette, it will function normally, except that when all is 72 done, Delphi will disply small window with title "Error" and message 73 "Operation aborted". Purely cosmetic issue for which there is no obviousOgreShadowCameraSetupPlaneOptimal.cpp http://gmogre3d.googlecode.com/svn/trunk/ | C++ | 428 lines
183 { 184 // error solving for projective matrix (rows 1,2,4) 185 } 206 { 207 // error solving for increased precision rows 1,2,4 208 } 255 { 256 // error solving for projective matrix (row 3) 257 }RendererImpl.java git://github.com/liferay/liferay-portal.git | Java | 425 lines
172 catch (Exception e) { 173 _log.error(e, e); 174runtests.py https://bitbucket.org/mirror/django/ | Python | 202 lines
59 def runTest(self): 60 from django.core.management.validation import get_validation_errors 61 from django.db.models.loading import load_app 68 69 # Make sure sys.stdout is not a tty so that we get errors without 70 # coloring attached (makes matching the results easier). We restore 74 sys.stdout = s 75 count = get_validation_errors(s, module) 76 sys.stdout = orig_stdout 77 s.seek(0) 78 error_log = s.read() 79 actual = error_log.split('\n') 79 actual = error_log.split('\n') 80 expected = module.model_errors.split('\n') 81appengine_config.py https://code.google.com/p/pageforest/ | Python | 228 lines
64# the web UI when an exception occurs. (Tracebacks are always logged 65# at the ERROR level as well.) 66PollsQuestionServiceHttp.java git://github.com/liferay/liferay-portal.git | Java | 235 lines
95 catch (com.liferay.portal.kernel.exception.SystemException se) { 96 _log.error(se, se); 97 128 catch (com.liferay.portal.kernel.exception.SystemException se) { 129 _log.error(se, se); 130 165 catch (com.liferay.portal.kernel.exception.SystemException se) { 166 _log.error(se, se); 167 210 catch (com.liferay.portal.kernel.exception.SystemException se) { 211 _log.error(se, se); 212configuration.jsp git://github.com/liferay/liferay-portal.git | JavaServer Pages | 272 lines
103 104 <liferay-ui:error key="emailFromAddress" message="please-enter-a-valid-email-address" /> 105 <liferay-ui:error key="emailFromName" message="please-enter-a-valid-name" /> 105 <liferay-ui:error key="emailFromName" message="please-enter-a-valid-name" /> 106 <liferay-ui:error key="emailArticleAddedBody" message="please-enter-a-valid-body" /> 107 <liferay-ui:error key="emailArticleAddedSubject" message="please-enter-a-valid-subject" /> 107 <liferay-ui:error key="emailArticleAddedSubject" message="please-enter-a-valid-subject" /> 108 <liferay-ui:error key="emailArticleApprovalDeniedBody" message="please-enter-a-valid-body" /> 109 <liferay-ui:error key="emailArticleApprovalDeniedSubject" message="please-enter-a-valid-subject" /> 109 <liferay-ui:error key="emailArticleApprovalDeniedSubject" message="please-enter-a-valid-subject" /> 110 <liferay-ui:error key="emailArticleApprovalGrantedBody" message="please-enter-a-valid-body" /> 111 <liferay-ui:error key="emailArticleApprovalGrantedSubject" message="please-enter-a-valid-subject" /> 111 <liferay-ui:error key="emailArticleApprovalGrantedSubject" message="please-enter-a-valid-subject" /> 112 <liferay-ui:error key="emailArticleApprovalRequestedBody" message="please-enter-a-valid-body" /> 113 <liferay-ui:error key="emailArticleApprovalRequestedSubject" message="please-enter-a-valid-subject" />ResolvedArrayBytecodeExpr.java git://github.com/groovypp/groovypp.git | Java | 303 lines
201 if (methodNode == null) { 202 compiler.addError("Cannot find method " + methodName + "() for type " + PresentationUtil.getText(vtype), exp); 203 return null; 263 if (methodNode == null) { 264 compiler.addError("Cannot find method " + methodName + "() for type " + PresentationUtil.getText(vtype), exp); 265 return null;mel-b-ccl.el git://github.com/wanderlust/flim.git | Emacs Lisp | 481 lines
260 (write-repeat r4)) 261 ;; error: BB=B 262 ((write (r4 & 255)) 472 (base64-ccl-decode-string string) 473 (error "Invalid encoded-text %s" string))) 474DeclPDA.cpp git://github.com/TTimo/doom3.gpl.git | C++ | 668 lines
147 148 if ( src.HadError() ) { 149 src.Warning( "PDA decl '%s' had a parse error", GetName() ); 359 src.LoadMemory( _text, textLength, GetFileName(), GetLineNum() ); 360 src.SetFlags( LEXFL_NOSTRINGCONCAT | LEXFL_ALLOWPATHNAMES | LEXFL_ALLOWMULTICHARLITERALS | LEXFL_ALLOWBACKSLASHSTRINGCONCAT | LEXFL_NOFATALERRORS ); 361 src.SkipUntilString( "{" ); 401 if ( token != "{" ) { 402 src.Warning( "Email decl '%s' had a parse error", GetName() ); 403 return false; 417 418 if ( src.HadError() ) { 419 src.Warning( "Email decl '%s' had a parse error", GetName() ); 485 src.LoadMemory( text, textLength, GetFileName(), GetLineNum() ); 486 src.SetFlags( LEXFL_NOSTRINGCONCAT | LEXFL_ALLOWPATHNAMES | LEXFL_ALLOWMULTICHARLITERALS | LEXFL_ALLOWBACKSLASHSTRINGCONCAT | LEXFL_NOFATALERRORS ); 487 src.SkipUntilString( "{" );Updater.cs https://hg01.codeplex.com/procon2 | C# | 0 lines
124 /// 125 /// This is so the update can forego checks and error logging later. 126 /// </summary> 176 catch (Exception e) { 177 this.Writer.WriteLine("\tERROR: {0}", e.Message); 178 } 209 catch (Exception e) { 210 this.Writer.WriteLine("\tERROR: {0}", e.Message); 211 } 256 /// <summary> 257 /// Creates a directory, logging the progress and errors (if any) 258 /// </summary> 267 catch (Exception e) { 268 this.Writer.WriteLine("\tERROR: {0}", e.Message); 269 }lilyString.py http://music21.googlecode.com/svn/trunk/ | Python | 440 lines
34 noPIL = False 35except ImportError: 36 noPIL = TrueVectorMapRenderer.java http://ametro.googlecode.com/svn/trunk/ | Java | 475 lines
183 } 184 }catch(OutOfMemoryError ex){ 185 // eat out-of-memory exceptionglobal_settings.py https://bitbucket.org/mirror/django/ | Python | 299 lines
17 18# People who get code error notifications. 19# In the format (('Full Name', 'email@domain.com'), ('Full Name', 'anotheremail@domain.com')) 87 88# E-mail address that error messages come from. 89SERVER_EMAIL = 'root@localhost'BaseMetadataPanel.java http://bungeni-editor.googlecode.com/svn/ | Java | 441 lines
158 159 public void addErrorMessage(java.awt.Component p, String msg) { 160 getContainerPanel().addErrorMessage(this, p, msg); 162 163 public String ErrorMessagesAsString() { 164 return getContainerPanel().ErrorMessagesAsString(); 383 } catch (Exception ex) { 384 log.error("exception in processCatalogCommand: " + ex.getMessage()); 385 log.error("exception in processCatalogCommand: " + CommonExceptionUtils.getStackTrace(ex)); 426 } catch (IllegalArgumentException ex) { 427 log.error("pasteTextIntoDocument : " + ex.getMessage()); 428 } finally {urlresolvers.py https://bitbucket.org/mirror/django/ | Python | 204 lines
75 self.current_arg += 1 76 except IndexError: 77 # The arg wasn't passed in. 110 return self.func, args, kwargs 111 except AttributeError: 112 self.func = self.get_callback() 118 return getattr(__import__(mod_name, '', '', ['']), func_name) 119 except ImportError, e: 120 raise ViewDoesNotExist, "Could not import %s. Error was: %s" % (mod_name, str(e)) 120 raise ViewDoesNotExist, "Could not import %s. Error was: %s" % (mod_name, str(e)) 121 except AttributeError, e: 122 raise ViewDoesNotExist, "Tried %s in module %s. Error was: %s" % (func_name, mod_name, str(e)) 176 return getattr(__import__(mod_name, '', '', ['']), func_name), {} 177 except (ImportError, AttributeError), e: 178 raise ViewDoesNotExist, "Tried %s. Error was: %s" % (callback, str(e))users_controller.php git://github.com/Datawalke/Coordino.git | PHP | 569 lines
77 $this->Email->send(); 78 $this->Session->setFlash('Go check your email!', 'error'); 79 }else { 79 }else { 80 $this->Session->setFlash('No user has that email address.', 'error'); 81 } 102 if($this->Auth->user('public_key') != $public_key) { 103 $this->Session->setFlash('Those are not your settings to change.', 'error'); 104 $this->redirect('/'); 121 $this->User->save($this->data); 122 $this->Session->setFlash('Settings updated!', 'error'); 123 }elseif(empty($this->data['User']['old_password'])) { 127 $this->User->save($this->data); 128 $this->Session->setFlash('Settings updated, except password.', 'error'); 129 }else {posts_controller.php git://github.com/Datawalke/Coordino.git | PHP | 632 lines
34 public function afterFilter() { 35 $this->Session->delete('errors'); 36 } 39 if(!$this->isAdmin($this->Auth->user('id'))) { 40 $this->Session->setFlash(__('You do not have permission to access that..',true), 'error'); 41 $this->redirect('/'); 43 $this->Post->delete($id); 44 $this->Session->setFlash(__('Post deleted',true), 'error'); 45 $this->redirect('/'); 152 $errors = array( 153 'errors' => $validationErrors, 154 'data' => $data 155 ); 156 $this->Session->write(array('errors' => $errors)); 157 $this->redirect($redirectUrl);phpthumb.bmp.php git://github.com/Datawalke/Coordino.git | PHP | 878 lines
110 if ($thisfile_bmp_header_raw['identifier'] != 'BM') { 111 $ThisFileInfo['error'][] = 'Expecting "BM" at offset '.intval(@$ThisFileInfo['avdataoffset']).', found "'.$thisfile_bmp_header_raw['identifier'].'"'; 112 unset($ThisFileInfo['fileformat']); 150 } else { 151 $ThisFileInfo['error'][] = 'Unknown BMP subtype (or not a BMP file)'; 152 unset($ThisFileInfo['fileformat']);phpthumb.class.php git://github.com/Datawalke/Coordino.git | PHP | 3948 lines
43 var $goto = null; // GO TO url after processing 44 var $err = null; // default ERRor image filename 45 var $xto = null; // extract eXif Thumbnail Only 82 83 // * Error message configuration 84 var $config_error_image_width = 400; 85 var $config_error_image_height = 100; 86 var $config_error_message_image_default = ''; 87 var $config_error_bgcolor = 'CCCCFF'; 87 var $config_error_bgcolor = 'CCCCFF'; 88 var $config_error_textcolor = 'FF0000'; 89 var $config_error_fontsize = 1; 89 var $config_error_fontsize = 1; 90 var $config_error_die_on_error = false; 91 var $config_error_silent_die_on_error = false;phpthumb.gif.php git://github.com/Datawalke/Coordino.git | PHP | 1173 lines
19// available, in which case it will attempt to output JPEG using GD functions 20// * added @ error-suppression to two lines where it checks: if ($this->m_img->m_bTrans) 21// otherwise warnings are generated if error_reporting == E_ALL 294 295 if ($Code == $this->Next[$Code]) // Circular table entry, big GIF Error! 296 return -1;phpThumb.php git://github.com/Datawalke/Coordino.git | PHP | 613 lines
35$phpThumb->DebugTimingMessage('phpThumb.php start', __FILE__, __LINE__, $starttime); 36$phpThumb->SetParameter('config_error_die_on_error', true); 37 96 } elseif ($_GET['hash'] != md5(str_replace('&hash='.$_GET['hash'], '', $_SERVER['QUERY_STRING']).$PHPTHUMB_CONFIG['high_security_password'])) { 97 $phpThumb->ErrorImage('ERROR: invalid hash'); 98 } 137 } else { 138 $phpThumb->ErrorImage('ERROR: "'.$SourceFilename.'" cannot be read'); 139 } 198 mysql_close($cid); 199 $phpThumb->ErrorImage('Error in MySQL query: "'.mysql_error($cid).'"'); 200 } 202 mysql_close($cid); 203 $phpThumb->ErrorImage('cannot select MySQL database: "'.mysql_error($cid).'"'); 204 }parsehtml.php git://github.com/Datawalke/Coordino.git | PHP | 618 lines
251 /** TODO **/ 252 #trigger_error('this might need some work', E_USER_NOTICE); 253 $pos = strpos($this->html, '>'); 582# testcase / example 583error_reporting(E_ALL); 584acl.php git://github.com/Datawalke/Coordino.git | PHP | 602 lines
75 $out = "--------------------------------------------------\n"; 76 $out .= __("Error: Your current Cake configuration is set to", true) . "\n"; 77 $out .= __("an ACL implementation other than DB. Please change", true) . "\n"; 147 } elseif (is_string($data)) { 148 $this->error(__('/ can not be used as an alias!', true), __("\t/ is the root, please supply a sub alias", true)); 149 } 173 if (!$this->Acl->{$class}->delete($nodeId)) { 174 $this->error(__("Node Not Deleted", true), sprintf(__("There was an error deleting the %s. Check that the node exists", true), $class) . ".\n"); 175 } 198 if (!$this->Acl->{$class}->save($data)) { 199 $this->out(__("Error in setting new parent. Please make sure the parent node exists, and is not a descendant of the node specified.", true), true); 200 } else { 219 if (empty($nodes)) { 220 $this->error( 221 sprintf(__("Supplied Node '%s' not found", true), $this->args[1]),cake.php git://github.com/Datawalke/Coordino.git | PHP | 666 lines
50/** 51 * Standard error stream. 52 * 148 if (function_exists('ini_set')) { 149 ini_set('display_errors', '1'); 150 ini_set('error_reporting', E_ALL & ~E_DEPRECATED & ~E_STRICT); 150 ini_set('error_reporting', E_ALL & ~E_DEPRECATED & ~E_STRICT); 151 ini_set('html_errors', false); 152 ini_set('implicit_flush', true); 160 define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); 161 define('DISABLE_DEFAULT_ERROR_HANDLING', false); 162 define('CAKEPHP_SHELL', true); 259 CORE_PATH . 'cake' . DS . 'libs' . DS . 'class_registry.php', 260 CORE_PATH . 'cake' . DS . 'console' . DS . 'error.php' 261 );code_coverage_manager.php git://github.com/Datawalke/Coordino.git | PHP | 804 lines
103 if (strpos($testCaseFile, $thisFile) !== false) { 104 trigger_error(__('Xdebug supports no parallel coverage analysis - so this is not possible.', true), E_USER_ERROR); 105 } 225 if (!file_exists($file)) { 226 trigger_error(sprintf(__('This test object file is invalid: %s', true), $file)); 227 return ; 238 if (!file_exists($testObjectFile)) { 239 trigger_error(sprintf(__('This test object file is invalid: %s', true), $testObjectFile)); 240 return ; 552 if (!file_exists($path)) { 553 trigger_error(__('This group file does not exist!', true)); 554 return array();model.test.php git://github.com/Datawalke/Coordino.git | PHP | 919 lines
246/** 247 * test that a bogus response doesn't cause errors to bubble up. 248 *translate.test.php git://github.com/Datawalke/Coordino.git | PHP | 1026 lines
480 481 // MSSQL trigger an error and stops the page even if the debug = 0 482 if ($this->db->config['driver'] != 'mssql') {containable.test.php git://github.com/Datawalke/Coordino.git | PHP | 3795 lines
148 function testInvalidContainments() { 149 $this->expectError(); 150 $r = $this->__containments($this->Article, array('Comment', 'InvalidBinding')); 226 227 $this->expectError(); 228 $r = $this->Article->find('all', array('contain' => array('Comment' => 'NonExistingBinding')));tree.test.php git://github.com/Datawalke/Coordino.git | PHP | 1932 lines
390 $initialCount = $this->Tree->find('count'); 391 //$this->expectError('Trying to save a node under a none-existant node in TreeBehavior::beforeSave'); 392model_behavior.test.php git://github.com/Datawalke/Coordino.git | PHP | 1138 lines
24 25Mock::generatePartial('BehaviorCollection', 'MockModelBehaviorCollection', array('cakeError', '_stop')); 26 255/** 256 * onError method 257 * 261 */ 262 function onError(&$model) { 263 $settings = $this->settings[$model->alias]; 263 $settings = $this->settings[$model->alias]; 264 if (!isset($settings['onError']) || $settings['onError'] == 'off') { 265 return parent::onError($model, $cascade); 266 } 267 echo "onError trigger success"; 268 }model_write.test.php git://github.com/Datawalke/Coordino.git | PHP | 4048 lines
166 * Ensure that if the id key is null but present the save doesn't fail (with an 167 * x sql error: "Column id specified twice") 168 *model_validation.test.php git://github.com/Datawalke/Coordino.git | PHP | 782 lines
145 ); 146 $this->assertEqual($TestModel->validationErrors, $expected); 147 $TestModel->validationErrors = array(); 152 ); 153 $this->assertEqual($TestModel->validationErrors, $expected); 154 $TestModel->validationErrors = array(); 160 ); 161 $this->assertEqual($TestModel->validationErrors, $expected); 162 $TestModel->validationErrors = array(); 166 $expected = array('name' => 'This field cannot be left blank'); 167 $this->assertEqual($TestModel->validationErrors, $expected); 168 192 $expected = array('name' => 'This field cannot be left blank'); 193 $this->assertEqual($TestModel->validationErrors, $expected); 194 }model_delete.test.php git://github.com/Datawalke/Coordino.git | PHP | 834 lines
426 427 $this->expectError(); 428 ob_start(); 430 ob_get_clean(); 431 $this->assertFalse($result, 'deleteAll returned true when find query generated sql error. %s'); 432 }js.test.php git://github.com/Datawalke/Coordino.git | PHP | 833 lines
151 $this->Js->TestEngine =& new StdClass(); 152 $this->expectError(); 153 $this->Js->someMethodThatSurelyDoesntExist();view.test.php git://github.com/Datawalke/Coordino.git | PHP | 1026 lines
25 26if (!class_exists('ErrorHandler')) { 27 App::import('Core', array('Error')); 79/** 80 * ViewTestErrorHandler class 81 * 84 */ 85class ViewTestErrorHandler extends ErrorHandler { 86 153/** 154 * cakeError method 155 * 161 function cakeError($method, $messages) { 162 $error =& new ViewTestErrorHandler($method, $messages); 163 return $error;email.test.php git://github.com/Datawalke/Coordino.git | PHP | 1331 lines
247 248 restore_error_handler(); 249 @$this->Controller->Component->init($this->Controller); 249 @$this->Controller->Component->init($this->Controller); 250 set_error_handler('simpleTestErrorHandler'); 251 269 $this->Controller->Session->delete('Message'); 270 restore_error_handler(); 271 ClassRegistry::flush(); 519 $result = $this->Controller->EmailTest->send('This is the body of the message'); 520 $code = substr($this->Controller->EmailTest->smtpError, 0, 3); 521 $this->skipIf(!$code, '%s Authentication not enabled on server');cookie.test.php git://github.com/Datawalke/Coordino.git | PHP | 530 lines
441/** 442 * test that no error is issued for non array data. 443 * 445 */ 446 function testNoErrorOnNonArrayData() { 447 $this->Controller->Cookie->destroy();acl.test.php git://github.com/Datawalke/Coordino.git | PHP | 646 lines
326 327 $this->expectError('DbAcl::allow() - Invalid node'); 328 $this->assertFalse($this->Acl->allow('Lumbergh', 'ROOT/tpsReports/DoesNotExist', 'create')); 329 330 $this->expectError('DbAcl::allow() - Invalid node'); 331 $this->assertFalse($this->Acl->allow('Homer', 'tpsReports', 'create')); 345 346 $this->expectError("DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references:\nAro: WRONG\nAco: tpsReports"); 347 $this->assertFalse($this->Acl->check('WRONG', 'tpsReports', 'read')); 348 349 $this->expectError("ACO permissions key foobar does not exist in DbAcl::check()"); 350 $this->assertFalse($this->Acl->check('Lumbergh', 'smash', 'foobar')); 351 352 $this->expectError("DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references:\nAro: users\nAco: NonExistant"); 353 $this->assertFalse($this->Acl->check('users', 'NonExistant', 'read'));auth.test.php git://github.com/Datawalke/Coordino.git | PHP | 1646 lines
534/** 535 * testIsErrorOrTests 536 * 539 */ 540 function testIsErrorOrTests() { 541 $this->Controller->Auth->initialize($this->Controller); 542 543 $this->Controller->name = 'CakeError'; 544 $this->assertTrue($this->Controller->Auth->startup($this->Controller));controller.test.php git://github.com/Datawalke/Coordino.git | PHP | 1546 lines
93 */ 94 var $invalidFields = array('name' => 'error_msg'); 95scaffold.test.php git://github.com/Datawalke/Coordino.git | PHP | 894 lines
347 $result = $ScaffoldView->testGetFilename('error'); 348 $expected = 'cake' . DS . 'libs' . DS . 'view' . DS . 'errors' . DS . 'scaffold_error.ctp'; 349 $this->assertEqual($result, $expected);configure.test.php git://github.com/Datawalke/Coordino.git | PHP | 833 lines
138/** 139 * testSetErrorReporting Level 140 * 142 */ 143 function testSetErrorReportingLevel() { 144 Configure::write('log', false); 146 Configure::write('debug', 0); 147 $result = ini_get('error_reporting'); 148 $this->assertEqual($result, 0); 150 Configure::write('debug', 2); 151 $result = ini_get('error_reporting'); 152 $this->assertEqual($result, E_ALL & ~E_DEPRECATED & ~E_STRICT); 153 154 $result = ini_get('display_errors'); 155 $this->assertEqual($result, 1);object.test.php git://github.com/Datawalke/Coordino.git | PHP | 866 lines
373 function testLog() { 374 @unlink(LOGS . 'error.log'); 375 $this->assertTrue($this->object->log('Test warning 1')); 376 $this->assertTrue($this->object->log(array('Test' => 'warning 2'))); 377 $result = file(LOGS . 'error.log'); 378 $this->assertPattern('/^2[0-9]{3}-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+ Error: Test warning 1$/', $result[0]); 378 $this->assertPattern('/^2[0-9]{3}-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+ Error: Test warning 1$/', $result[0]); 379 $this->assertPattern('/^2[0-9]{3}-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+ Error: Array$/', $result[1]); 380 $this->assertPattern('/^\($/', $result[2]); 382 $this->assertPattern('/^\)$/', $result[4]); 383 unlink(LOGS . 'error.log'); 384 384 385 @unlink(LOGS . 'error.log'); 386 $this->assertTrue($this->object->log('Test warning 1', LOG_WARNING));folder.test.php git://github.com/Datawalke/Coordino.git | PHP | 794 lines
132 133 $this->expectError(); 134 195 $expected = $new . ' is a file'; 196 $result = array_pop($Folder->errors()); 197 $this->assertEqual($result, $expected);error.test.php git://github.com/Datawalke/Coordino.git | PHP | 630 lines
310 ob_start(); 311 $TestErrorHandler = new TestErrorHandler('error404', array('message' => 'Page not found')); 312 ob_clean(); 335 ob_start(); 336 $TestErrorHandler = new TestErrorHandler('error404', array('message' => 'Page not found', 'url' => '/test_error')); 337 $result = ob_get_clean(); 341 ob_start(); 342 $TestErrorHandler =& new TestErrorHandler('error404', array('message' => 'Page not found')); 343 ob_get_clean(); 363 ob_start(); 364 $TestErrorHandler = new TestErrorHandler('error500', array( 365 'message' => 'An Internal Error Has Occurred' 370 ob_start(); 371 $TestErrorHandler = new TestErrorHandler('error500', array( 372 'message' => 'An Internal Error Has Occurred',dispatcher.test.php git://github.com/Datawalke/Coordino.git | PHP | 2625 lines
45 function _invoke(&$controller, $params) { 46 restore_error_handler(); 47 if ($result = parent::_invoke($controller, $params)) { 51 } 52 set_error_handler('simpleTestErrorHandler'); 53 57/** 58 * cakeError method 59 * 63 */ 64 function cakeError($filename, $params) { 65 return array($filename, $params); 762 ), 763 'error' => array( 764 'File' => array(dbo_sqlite.php git://github.com/Datawalke/Coordino.git | PHP | 623 lines
189/** 190 * Returns an array of tables in the database. If there are no tables, an error is raised and the application exits. 191 * 322/** 323 * Returns a formatted error message from previous database operation. 324 * 324 * 325 * @return string Error message 326 */ 327 function lastError() { 328 $error = sqlite_last_error($this->connection); 329 if ($error) { 329 if ($error) { 330 return $error.': '.sqlite_error_string($error); 331 }dbo_oracle.php git://github.com/Datawalke/Coordino.git | PHP | 1159 lines
135/** 136 * Last error issued by oci extension 137 * 139 */ 140 var $_error; 141 192 $this->connected = false; 193 $this->_setError(); 194 return false; 199/** 200 * Keeps track of the most recent Oracle error 201 * 202 */ 203 function _setError($source = null, $clear = false) { 204 if ($source) {dbo_postgres.php git://github.com/Datawalke/Coordino.git | PHP | 978 lines
170/** 171 * Returns an array of tables in the database. If there are no tables, an error is raised and the application exits. 172 * 336/** 337 * Returns a formatted error message from previous database operation. 338 * 338 * 339 * @return string Error message 340 */ 341 function lastError() { 342 $error = pg_last_error($this->connection); 343 return ($error) ? $error : null;dbo_mssql.php git://github.com/Datawalke/Coordino.git | PHP | 792 lines
115 * @param array $config Configuration data from app/config/databases.php 116 * @return boolean True if connected successfully, false on error 117 */ 120 if (!function_exists('mssql_min_message_severity')) { 121 trigger_error(__("PHP SQL Server interface is not installed, cannot continue. For troubleshooting information, see http://php.net/mssql/", true), E_USER_WARNING); 122 } 193 $result = @mssql_query($sql, $this->connection); 194 $this->__lastQueryHadError = ($result === false); 195 return $result; 436 * 437 * @return string Error message with error number 438 */ 441 $error = mssql_get_last_message(); 442 if ($error && !preg_match('/contexto de la base de datos a|contesto di database|changed database|contexte de la base de don|datenbankkontext/i', $error)) { 443 return $error;dbo_mysql.php git://github.com/Datawalke/Coordino.git | PHP | 812 lines
196 if (!$this->execute($this->renderStatement('update', compact('table', 'alias', 'joins', 'fields', 'conditions')))) { 197 $model->onError(); 198 return false; 236 if ($this->execute($this->renderStatement('delete', compact('alias', 'table', 'joins', 'conditions'))) === false) { 237 $model->onError(); 238 return false; 354 if (!is_a($schema, 'CakeSchema')) { 355 trigger_error(__('Invalid schema object', true), E_USER_WARNING); 356 return null;dbo_source.php git://github.com/Datawalke/Coordino.git | PHP | 2939 lines
227 function rawQuery($sql) { 228 $this->took = $this->error = $this->numRows = false; 229 return $this->execute($sql); 233 * Queries the database with given SQL statement, and obtains some metadata about the result 234 * (rows affected, timing, any errors, number of rows in resultset). The query is also logged. 235 * If Configure::read('debug') is set, the log is shown all the time, else it is only shown on errors. 239 * - stats - Collect meta data stats for this query. Stats include time take, rows affected, 240 * any errors, and number of rows returned. Defaults to `true`. 241 * - log - Whether or not the query should be logged to the memory log. 256 $this->affected = $this->lastAffected(); 257 $this->error = $this->lastError(); 258 $this->numRows = $this->lastNumRows(); 264 265 if ($this->error) { 266 $this->showQuery($sql);translate.php git://github.com/Datawalke/Coordino.git | PHP | 649 lines
71 if (!$db->connected) { 72 trigger_error( 73 sprintf(__('Datasource %s for TranslateBehavior of model %s is not connected', true), $model->useDbConfig, $model->alias), 73 sprintf(__('Datasource %s for TranslateBehavior of model %s is not connected', true), $model->useDbConfig, $model->alias), 74 E_USER_ERROR 75 );tree.php git://github.com/Datawalke/Coordino.git | PHP | 980 lines
35/** 36 * Errors 37 * 39 */ 40 var $errors = array(); 41model.php git://github.com/Datawalke/Coordino.git | PHP | 3093 lines
130/** 131 * List of validation errors. 132 * 136 */ 137 var $validationErrors = array(); 138model_behavior.php git://github.com/Datawalke/Coordino.git | PHP | 533 lines
145/** 146 * DataSource error callback 147 * 148 * @param object $model Model using this behavior 149 * @param string $error Error generated in DataSource 150 * @access public 151 */ 152 function onError(&$model, $error) { } 153 285 if (!App::import('Behavior', $behavior)) { 286 $this->cakeError('missingBehaviorFile', array(array( 287 'behavior' => $behavior, 294 if (!class_exists($class)) { 295 $this->cakeError('missingBehaviorClass', array(array( 296 'behavior' => $class,js.php git://github.com/Datawalke/Coordino.git | PHP | 1133 lines
153 } 154 trigger_error(sprintf(__('JsHelper:: Missing Method %s is undefined', true), $method), E_USER_WARNING); 155 }html.php git://github.com/Datawalke/Coordino.git | PHP | 835 lines
87 'li' => '<li%s>%s</li>', 88 'error' => '<div%s>%s</div>', 89 'javascriptblock' => '<script type="text/javascript"%s>%s</script>',form.php git://github.com/Datawalke/Coordino.git | PHP | 2226 lines
213 if (is_a($currentObject, 'Model') && !empty($currentObject->validationErrors)) { 214 $this->validationErrors[Inflector::camelize($currentModel)] =& $currentObject->validationErrors; 215 } 462 * @access public 463 * @link http://book.cakephp.org/view/1426/isFieldError 464 */ 464 */ 465 function isFieldError($field) { 466 $this->setEntity($field); 470/** 471 * Returns a formatted error message for given FORM field, NULL if no errors. 472 * 483 * @param array $options Rendering options for <div /> wrapper tag 484 * @return string If there are errors this method returns an error message, otherwise null. 485 * @access publicpaginator.php git://github.com/Datawalke/Coordino.git | PHP | 814 lines
98 if (!is_callable(array($classname, 'link'))) { 99 trigger_error(sprintf(__('%s does not implement a link() method, it is incompatible with PaginatorHelper', true), $classname), E_USER_WARNING); 100 }helper.php git://github.com/Datawalke/Coordino.git | PHP | 912 lines
114/** 115 * Contains model validation errors of form post-backs 116 * 119 */ 120 var $validationErrors = null; 121 153 function call__($method, $params) { 154 trigger_error(sprintf(__('Method %1$s::%2$s does not exist', true), get_class($this), $method), E_USER_WARNING); 155 } 575/** 576 * Returns null if given FORM field has no errors. Otherwise it returns the constant set in 577 * the array Model->validationErrors. 581 * @param integer $modelID Unique index identifying this record within the form 582 * @return mixed Null if no errors, string with error otherwhise. 583 */view.php git://github.com/Datawalke/Coordino.git | PHP | 993 lines
184/** 185 * holds current errors for the model validation 186 * 189 */ 190 var $validationErrors = array(); 191 453 $out = $this->_render($viewFileName, $this->viewVars); 454 trigger_error(sprintf(__("Error in view %s, got: <blockquote>%s</blockquote>", true), $viewFileName, $out), E_USER_ERROR); 455 } 459/** 460 * Renders a layout. Returns output from _render(). Returns false on error. 461 * Several variables are created for use in layout. 497 $this->output = $this->_render($layoutFileName, $dataForLayout); 498 trigger_error(sprintf(__("Error in layout %s, got: <blockquote>%s</blockquote>", true), $layoutFileName, $this->output), E_USER_ERROR); 499 return false;acl.php git://github.com/Datawalke/Coordino.git | PHP | 638 lines
54 } else { 55 trigger_error(sprintf(__('Could not find %s.', true), $name), E_USER_WARNING); 56 } 179 if (strcasecmp(get_class($this), "AclBase") == 0 || !is_subclass_of($this, "AclBase")) { 180 trigger_error(__("[acl_base] The AclBase class constructor has been called, or the class was instantiated. This class must remain abstract. Please refer to the Cake docs for ACL configuration.", true), E_USER_ERROR); 181 return NULL; 272 if (empty($aroPath) || empty($acoPath)) { 273 trigger_error(__("DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references:\nAro: ", true) . print_r($aro, true) . "\nAco: " . print_r($aco, true), E_USER_WARNING); 274 return false; 277 if ($acoPath == null || $acoPath == array()) { 278 trigger_error(__("DbAcl::check() - Failed ACO node lookup in permissions check. Node references:\nAro: ", true) . print_r($aro, true) . "\nAco: " . print_r($aco, true), E_USER_WARNING); 279 return false; 285 if ($action != '*' && !in_array('_' . $action, $permKeys)) { 286 trigger_error(sprintf(__("ACO permissions key %s does not exist in DbAcl::check()", true), $action), E_USER_NOTICE); 287 return false;auth.php git://github.com/Datawalke/Coordino.git | PHP | 959 lines
187/** 188 * Error to display when user login fails. For security purposes, only one error is used for all 189 * login failures, so as not to expose information on why the login failed. 192 * @access public 193 * @link http://book.cakephp.org/view/1272/loginError 194 */ 194 */ 195 var $loginError = null; 196 197/** 198 * Error to display when user attempts to access an object or action to which they do not have 199 * acccess. 202 * @access public 203 * @link http://book.cakephp.org/view/1273/authError 204 */email.php git://github.com/Datawalke/Coordino.git | PHP | 1008 lines
68/** 69 * The mail that will be used in case of any errors like 70 * - Remote mailserver down 255/** 256 * Placeholder for any errors that might happen with the 257 * smtp mail methods 261 */ 262 var $smtpError = null; 263 435 $this->date = null; 436 $this->smtpError = null; 437 $this->attachments = array();scaffold.php git://github.com/Datawalke/Coordino.git | PHP | 616 lines
171 if (!is_object($this->controller->{$this->modelClass})) { 172 return $this->cakeError('missingModel', array(array( 173 'className' => $this->modelClass, 'webroot' => '', 'base' => $controller->base 241 $this->_output(); 242 } elseif ($this->controller->_scaffoldError('view') === false) { 243 return $this->__scaffoldError(); 261 $this->_output(); 262 } elseif ($this->controller->_scaffoldError('index') === false) { 263 return $this->__scaffoldError(); 287 * @param string $action add or edt 288 * @return mixed Success on save/update, add/edit form if data is empty or error if save or update fails 289 * @access private 336 } else { 337 return $this->controller->_afterScaffoldSaveError($action); 338 }xml.php git://github.com/Datawalke/Coordino.git | PHP | 1460 lines
407 if ($this->compare($child)) { 408 trigger_error(__('Cannot append a node to itself.', true)); 409 $return = false;folder.php git://github.com/Datawalke/Coordino.git | PHP | 787 lines
71/** 72 * Holds errors from last method. 73 * 76 */ 77 var $__errors = false; 78 382 383 $this->__errors[] = sprintf(__('%s NOT changed to %s', true), $path, $mode); 384 return false; 401 } else { 402 $this->__errors[] = sprintf(__('%s NOT changed to %s', true), $fullpath, $mode); 403 } 406 407 if (empty($this->__errors)) { 408 return true;configure.php git://github.com/Datawalke/Coordino.git | PHP | 1328 lines
118 if (function_exists('ini_set')) { 119 ini_set('display_errors', 1); 120 } 122 } elseif (function_exists('ini_set')) { 123 ini_set('display_errors', 0); 124 } 131 } 132 error_reporting($reporting); 133 if (!class_exists('CakeLog')) { 400 if (!include(CONFIGS . 'core.php')) { 401 trigger_error(sprintf(__("Can't find application core file. Please create %score.php, and make sure it is readable by PHP.", true), CONFIGS), E_USER_ERROR); 402 } 441 if (!include(CONFIGS . 'bootstrap.php')) { 442 trigger_error(sprintf(__("Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", true), CONFIGS), E_USER_ERROR); 443 }http_socket.php git://github.com/Datawalke/Coordino.git | PHP | 1081 lines
182 * @param mixed $request Either an URI string, or an array defining host/uri 183 * @return mixed false on error, request body on success 184 * @access publiccake_session.php git://github.com/Datawalke/Coordino.git | PHP | 794 lines
72/** 73 * Error number of last occurred error 74 * 311 * 312 * @param integer $errorNumber Error to set 313 * @return string Error as string 316 function __error($errorNumber) { 317 if (!is_array($this->error) || !array_key_exists($errorNumber, $this->error)) { 318 return false; 319 } else { 320 return $this->error[$errorNumber]; 321 } 331 if ($this->lastError) { 332 return $this->__error($this->lastError); 333 } else {validation.php git://github.com/Datawalke/Coordino.git | PHP | 1060 lines
84/** 85 * Holds an array of errors messages set in this class. 86 * These are used for debugging purposes 90 */ 91 var $errors = array(); 92 341 $_this =& Validation::getInstance(); 342 $_this->errors[] = __('You must define the $operator parameter for Validation::comparison()', true); 343 break; 365 if ($_this->regex === null) { 366 $_this->errors[] = __('You must define a regular expression for Validation::custom()', true); 367 return false;debugger.php git://github.com/Datawalke/Coordino.git | PHP | 721 lines
81 'trace' => '{:reference} - {:path}, line {:line}', 82 'error' => "{:error} ({:code}): {:description} in [{:file}, line {:line}]" 83 ), 96 'txt' => array( 97 'error' => "{:error}: {:code} :: {:description} on line {:line} of {:path}\n{:info}", 98 'context' => "Context:\n{:context}\n", 239 * @param integer $code Code of error 240 * @param string $description Error description 241 * @param string $file File on which error occurred 274 case E_USER_ERROR: 275 $error = 'Fatal Error'; 276 $level = LOG_ERROR; 313 314 if ($error == 'Fatal Error') { 315 exit();dispatcher.php git://github.com/Datawalke/Coordino.git | PHP | 662 lines
87 * 88 * If no controller of given name can be found, invoke() shows error messages in 89 * the form of Missing Controllers information. It does the same with Actions (methods of Controllers are called 119 Router::setRequestInfo(array($this->params, array('base' => $this->base, 'webroot' => $this->webroot))); 120 return $this->cakeError('missingController', array(array( 121 'className' => Inflector::camelize($this->params['controller']) . 'Controller', 143 if ($privateAction) { 144 return $this->cakeError('privateAction', array(array( 145 'className' => Inflector::camelize($this->params['controller'] . "Controller"), 195 } 196 return $this->cakeError('missingAction', array(array( 197 'className' => Inflector::camelize($params['controller']."Controller"),jquery-ui-1.7.2.custom.css http://atlascakephp.googlecode.com/svn/trunk/ | CSS | 407 lines
44* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. 45* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial,sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=7b9101&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=15&borderColorHeader=c3d756&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=eeeeee&fcContent=333333&iconColorContent=cc0000&bgColorDefault=eeeeee&bgTextureDefault=04_highlight_hard.png&bgImgOpacityDefault=100&borderColorDefault=d8dcdf&fcDefault=004276&iconColorDefault=7b9101&bgColorHover=f6f6f6&bgTextureHover=04_highlight_hard.png&bgImgOpacityHover=100&borderColorHover=cdd5da&fcHover=111111&iconColorHover=2d3503&bgColorActive=ffffff&bgTextureActive=01_flat.png&bgImgOpacityActive=65&borderColorActive=eeeeee&fcActive=404c01&iconColorActive=7b9101&bgColorHighlight=fbf8ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcd3a1&fcHighlight=444444&iconColorHighlight=004276&bgColorError=f3d8d8&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=75&borderColorError=cc0000&fcError=2e2e2e&iconColorError=cc0000&bgColorOverlay=a6a6a6&bgTextureOverlay=09_dots_small.png&bgImgOpacityOverlay=65&opacityOverlay=40&bgColorShadow=333333&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=10&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px 46*/ 70.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #444444; } 71.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cc0000; background: #f3d8d8 url(images/ui-bg_diagonals-thick_75_f3d8d8_40x40.png) 50% 50% repeat; color: #2e2e2e; } 72.ui-state-error a, .ui-widget-content .ui-state-error a { color: #2e2e2e; } 72.ui-state-error a, .ui-widget-content .ui-state-error a { color: #2e2e2e; } 73.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #2e2e2e; } 74.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } 88.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_004276_256x240.png); } 89.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cc0000_256x240.png); } 90ktmodels_controller.php http://atlascakephp.googlecode.com/svn/trunk/ | PHP | 517 lines
111 if(!$this->__checkDirectoryProject()){ 112 $this->Session->setFlash(__('Error directory configuration, files not could be created, check configuration',true)); 113 $this->log(__('Error directory configuration, files not could be created, check configuration',true), LOG_DEBUG);IvyLibraryController.java http://ivybeans.googlecode.com/svn/trunk/ | Java | 463 lines
38import org.netbeans.spi.project.support.ant.EditableProperties; 39import org.openide.ErrorManager; 40import org.openide.filesystems.FileChangeAdapter; 138 } catch (MalformedURLException ex) { 139 ErrorManager.getDefault().notify(ex); 140 } 159 } catch (MalformedURLException ex) { 160 ErrorManager.getDefault().notify(new Exception(path, ex)); 161 } 184 } catch (MalformedURLException ex) { 185 ErrorManager.getDefault().notify(ex); 186 } 278 } catch (IvyLibraryException ex) { 279 ErrorManager.getDefault().notify(ex); 280 } catch (IOException ex) {tests.py https://bitbucket.org/mirror/django/ | Python | 581 lines
20from django.utils.functional import empty 21from django.utils._os import rmtree_errorhandler 22 67 def assertFileNotFound(self, filepath): 68 self.assertRaises(IOError, self._get_file, filepath) 69 104 self.run_collectstatic() 105 # Use our own error handler that can handle .svn dirs on Windows 106 self.addCleanup(shutil.rmtree, settings.STATIC_ROOT, 106 self.addCleanup(shutil.rmtree, settings.STATIC_ROOT, 107 ignore_errors=True, onerror=rmtree_errorhandler) 108 298 """ 299 self.assertStaticRaises(ValueError, 300 "does/not/exist.png",__init__.py https://bitbucket.org/mirror/django/ | Python | 765 lines
10 from io import BytesIO as StringIO 11except ImportError: 12 try: 13 from cStringIO import StringIO 14 except ImportError: 15 from StringIO import StringIO 18 from mod_python.util import parse_qsl 19except ImportError: 20 try: 22 from urlparse import parse_qsl 23 except ImportError: 24 # Python 2.5. Works on Python 2.6 but raises PendingDeprecationWarning 38 _cookie_allows_colon_in_names = True 39except Cookie.CookieError: 40 _cookie_allows_colon_in_names = Falsemultipartparser.py https://bitbucket.org/mirror/django/ | Python | 638 lines
82 content_length = int(META.get('HTTP_CONTENT_LENGTH', META.get('CONTENT_LENGTH',0))) 83 except (ValueError, TypeError): 84 content_length = 0 87 # This means we shouldn't continue...raise an error. 88 raise MultiPartParserError("Invalid content length: %r" % content_length) 89 154 field_name = disposition['name'].strip() 155 except (KeyError, IndexError, AttributeError): 156 continue 191 content_length = int(meta_data.get('content-length')[0]) 192 except (IndexError, TypeError, ValueError): 193 content_length = None 210 except Exception, e: 211 # Since this is only a chunk, any error is an unfixable error. 212 raise MultiPartParserError("Could not decode base64 data: %r" % e)base.py https://bitbucket.org/mirror/django/ | Python | 437 lines
213 # raise the error and quit. 214 sys.stderr.write(smart_text(self.style.ERROR('Error: %s\n' % e))) 215 sys.exit(1) 252 s = StringIO() 253 num_errors = get_validation_errors(s, app) 254 if num_errors: 256 error_text = s.read() 257 raise CommandError("One or more models did not validate:\n%s" % error_text) 258 if display_num_errors: 258 if display_num_errors: 259 self.stdout.write("%s error%s found\n" % (num_errors, num_errors != 1 and 's' or '')) 260 379 if not re.search(r'^[_a-zA-Z]\w*$', name): # If it's not a valid directory name. 380 # Provide a smart error message, depending on the error. 381 if not re.search(r'^[_a-zA-Z]', name):urlresolvers.py https://bitbucket.org/mirror/django/ | Python | 520 lines
74class NoReverseMatch(Exception): 75 # Don't make this raise an error when used in a template. 76 silent_variable_failure = True 84 85 If can_fail is True, lookup_view might be a URL pattern label, so errors 86 during the import fail and the string is returned. 98 (mod_name, func_name)) 99 except AttributeError: 100 if not can_fail: 103 (lookup_view, mod_name)) 104 except ImportError: 105 parentmod, submod = get_mod_func(mod_name) 359 lookup_view = get_callable(lookup_view, True) 360 except (ImportError, AttributeError), e: 361 raise NoReverseMatch("Error importing '%s': %s." % (lookup_view, e))testcases.py https://bitbucket.org/mirror/django/ | Python | 721 lines
10from django.core import mail 11from django.core.exceptions import ValidationError 12from django.core.management import call_command 216 example, exc_info) 217 # Rollback, in case of database errors. Otherwise they'd have 218 # side effects on other tests. 279 expected_exception: Exception class expected to be raised. 280 expected_message: expected error message string value. 281 callable_obj: Function to be called. 297 invalid: a dictionary mapping invalid inputs to one or more 298 raised error messages. 299 field_args: the args passed to instantiate the field 315 # test invalid inputs 316 for input, errors in invalid.items(): 317 with self.assertRaises(ValidationError) as context_manager:client.py https://bitbucket.org/mirror/django/ | Python | 568 lines
13 from cStringIO import StringIO 14 except ImportError: 15 from StringIO import StringIO 182 self.cookies = SimpleCookie() 183 self.errors = StringIO() 184 200 'wsgi.input': FakePayload(b('')), 201 'wsgi.errors': self.errors, 202 'wsgi.multiprocess': True, 384 # the 500.html template. If that template is not available, 385 # we should ignore the error in favor of re-raising the 386 # underlying exception that caused the 500 error. Any other 386 # underlying exception that caused the 500 error. Any other 387 # template found to be missing during view error handling 388 # should be reported as-is.defaulttags.py https://bitbucket.org/mirror/django/ | Python | 1307 lines
9from django.template.base import (Node, NodeList, Template, Library, 10 TemplateSyntaxError, VariableDoesNotExist, InvalidTemplateLibrary, 11 BLOCK_TAG_START, BLOCK_TAG_END, VARIABLE_TAG_START, VARIABLE_TAG_END, 172 unpacked_vars = dict(zip(self.loopvars, item)) 173 except TypeError: 174 pass 324 fp.close() 325 except IOError: 326 output = '' 330 return t.render(context) 331 except TemplateSyntaxError, e: 332 if settings.DEBUG: 332 if settings.DEBUG: 333 return "[Included template had syntax error: %s]" % e 334 else:debug.py https://bitbucket.org/mirror/django/ | Python | 1093 lines
64 text = reporter.get_traceback_text() 65 return HttpResponseServerError(text, mimetype='text/plain') 66 else: 67 html = reporter.get_traceback_html() 68 return HttpResponseServerError(html, mimetype='text/html') 69 82 raise ImproperlyConfigured( 83 'Error importing default exception reporter filter %s: "%s"' % (modpath, e)) 84 try: 222 for t in source_list_func(str(self.exc_value))] 223 except AttributeError: 224 template_list = [] 335 f.close() 336 except (OSError, IOError): 337 passencoder.py https://bitbucket.org/mirror/django/ | Python | 431 lines
96 97 If skipkeys is False, then it is a TypeError to attempt 98 encoding of keys that are not str, int, long, float or None. If 106 objects will be checked for circular references during encoding to 107 prevent an infinite recursion (which would cause an OverflowError). 108 Otherwise, no such check takes place. 112 but is consistent with most JavaScript based encoders and decoders. 113 Otherwise, it will be a ValueError to encode such floats. 114 152 a serializable object for ``o``, or calls the base implementation 153 (to raise a ``TypeError``). 154 255 _True=True, 256 ValueError=ValueError, 257 _basestring=basestring, # XXX bug in fixer: replaces LHS with str__init__.py https://bitbucket.org/mirror/django/ | Python | 374 lines
80 ... return [obj.real, obj.imag] 81 ... raise TypeError("%r is not JSON serializable" % (o,)) 82 ... 116 use_system_version = True 117except ImportError: 118 pass 152 use_system_version = True 153 except (ImportError, NameError): 154 pass 212 ``default(obj)`` is a function that should return a serializable version 213 of obj or raise TypeError. The default simply raises TypeError. 214 272 ``default(obj)`` is a function that should return a serializable version 273 of obj or raise TypeError. The default simply raises TypeError. 274trans_real.py https://bitbucket.org/mirror/django/ | Python | 575 lines
11 from cStringIO import StringIO 12except ImportError: 13 from StringIO import StringIO 135 return t 136 except IOError: 137 return None 217 return t.to_language() 218 except AttributeError: 219 passdictconfig.py https://bitbucket.org/mirror/django/ | Python | 554 lines
30 if not m: 31 raise ValueError('Not a valid Python identifier: %r' % s) 32 return True 38 from logging import _checkLevel 39except ImportError: 40 def _checkLevel(level): 44 if level not in logging._levelNames: 45 raise ValueError('Unknown level: %r' % level) 46 rv = logging._levelNames[level] 47 else: 48 raise TypeError('Level not an integer or a ' 49 'valid string: %r' % level) 169 found = getattr(found, frag) 170 except AttributeError: 171 self.importer(used)datastructures.py https://bitbucket.org/mirror/django/ | Python | 506 lines
20 pass 21 raise KeyError 22 217 218class MultiValueDictKeyError(KeyError): 219 pass 252 Returns the last data value for this key, or [] if it's an empty list; 253 raises KeyError if not found. 254 """ 260 return list_[-1] 261 except IndexError: 262 return [] 300 val = self[key] 301 except KeyError: 302 return defaultrelated.py https://bitbucket.org/mirror/django/ | Python | 1266 lines
56 app_label, model_name = relation.split(".") 57 except ValueError: 58 # If we can't split, assume a model in current app 60 model_name = relation 61 except AttributeError: 62 # If it doesn't have a split it's actually a model class 141 return [] 142 raise TypeError("Related Field has invalid lookup: %s" % lookup_type) 143 172 return [] 173 raise TypeError("Related Field has invalid lookup: %s" % lookup_type) 174 195 field_name = None 196 except AttributeError: 197 pass__init__.py https://bitbucket.org/mirror/django/ | Python | 1199 lines
120 messages.update(error_messages or {}) 121 self.error_messages = messages 122 164 if errors: 165 raise exceptions.ValidationError(errors) 166 183 return 184 raise exceptions.ValidationError(self.error_messages['invalid_choice'] % value) 185 186 if value is None and not self.null: 187 raise exceptions.ValidationError(self.error_messages['null']) 188 189 if not self.blank and value in validators.EMPTY_VALUES: 190 raise exceptions.ValidationError(self.error_messages['blank']) 191base.py https://bitbucket.org/mirror/django/ | Python | 917 lines
8from django.core.exceptions import (ObjectDoesNotExist, 9 MultipleObjectsReturned, FieldError, ValidationError, NON_FIELD_ERRORS) 10from django.core import validators 13 OneToOneField, add_lazy_relation) 14from django.db import (connections, router, transaction, DatabaseError, 15 DEFAULT_DB_ALIAS) 112 if parent._meta.fields: 113 raise TypeError("Abstract base class containing model fields not permitted for proxy model '%s'." % name) 114 else: 116 if base is not None: 117 raise TypeError("Proxy model '%s' has more than one non-abstract model base class." % name) 118 else: 120 if base is None: 121 raise TypeError("Proxy model '%s' has no non-abstract model base class." % name) 122 if (new_class._meta.local_fields or__init__.py https://bitbucket.org/mirror/django/ | Python | 943 lines
2 import thread 3except ImportError: 4 import dummy_thread as thread 10from django.db.backends import util 11from django.db.transaction import TransactionManagementError 12from django.utils import datetime_safe 110 else: 111 raise TransactionManagementError("This code isn't under transaction " 112 "management") 114 self.rollback() 115 raise TransactionManagementError("Transaction managed block ended with " 116 "pending COMMIT/ROLLBACK") 134 else: 135 raise TransactionManagementError("This code isn't under transaction " 136 "management")formsets.py https://bitbucket.org/mirror/django/ | Python | 373 lines
35 def __init__(self, data=None, files=None, auto_id='id_%s', prefix=None, 36 initial=None, error_class=ErrorList): 37 self.is_bound = data is not None or files is not None 42 self.initial = initial 43 self.error_class = error_class 44 self._errors = None 231 """ 232 Returns an ErrorList of errors that aren't associated with a particular 233 form -- i.e., from formset.clean(). Returns an empty ErrorList if there 287 form = self.forms[i] 288 self._errors.append(form.errors) 289 # Give self.clean() a chance to do cross-form validation. 292 except ValidationError, e: 293 self._non_form_errors = self.error_class(e.messages) 294options.py https://bitbucket.org/mirror/django/ | Python | 1455 lines
11from django.views.decorators.csrf import csrf_protect 12from django.core.exceptions import PermissionDenied, ValidationError 13from django.core.paginator import Paginatorsites.py https://bitbucket.org/mirror/django/ | Python | 426 lines
120 """ 121 Disable a globally-registered action. Raises KeyError for invalid names. 122 """ 127 Explicitally get a registered global action wheather it's enabled or 128 not. Raises KeyError for invalid names. 129 """global_settings.py https://bitbucket.org/mirror/django/ | Python | 580 lines
22 23# People who get code error notifications. 24# In the format (('Full Name', 'email@example.com'), ('Full Name', 'anotheremail@example.com')) 137 138# E-mail address that error messages come from. 139SERVER_EMAIL = 'root@localhost'tests.py https://bitbucket.org/mirror/django/ | Python | 1496 lines
80 # If we specify fields or fieldsets, it should exclude fields on the Form class 81 # to the fields specified. This may cause errors to be raised in the db layer if 82 # required model fields arent in fields/fieldsets, but that's preferable to 82 # required model fields arent in fields/fieldsets, but that's preferable to 83 # ghost errors where you have a field in your Form class that isn't being 84 # displayed because you forgot to add it to fields/fieldsetstests.py https://bitbucket.org/mirror/django/ | Python | 537 lines
19from django.utils.functional import empty 20from django.utils._os import rmtree_errorhandler 21 66 def assertFileNotFound(self, filepath): 67 self.assertRaises(IOError, self._get_file, filepath) 68 99 self.run_collectstatic() 100 # Use our own error handler that can handle .svn dirs on Windows 101 self.addCleanup(shutil.rmtree, settings.STATIC_ROOT, 101 self.addCleanup(shutil.rmtree, settings.STATIC_ROOT, 102 ignore_errors=True, onerror=rmtree_errorhandler) 103 294 """ 295 self.assertTemplateRaises(ValueError, """ 296 {% load static from staticfiles %}{% static "does/not/exist.png" %}tests.py https://bitbucket.org/mirror/django/ | Python | 545 lines
51 """ 52 get_storage_class raises an error if the requested import don't exist. 53 """ 61 """ 62 get_storage_class raises an error if the requested class don't exist. 63 """ 72 """ 73 get_storage_class raises an error if the requested module don't exist. 74 """ 298 raise OSError(errno.EEXIST, 'simulated EEXIST') 299 elif path == os.path.join(self.temp_dir, 'error'): 300 raise OSError(errno.EACCES, 'simulated EACCES') 353 # Check that OSErrors aside from ENOENT are still raised. 354 self.storage.save('error.file', ContentFile('delete with error')) 355 self.assertRaises(OSError, self.storage.delete, 'error.file')tests.py https://bitbucket.org/mirror/django/ | Python | 1721 lines
41from nodelist import NodelistTest 42from nodelist import NodelistTest, ErrorIndexTest 43from smartif import * 47 from loaders import * 48except ImportError, e: 49 if "pkg_resources" in e.args[0]: 117 raise SomeOtherException 118 raise KeyError 119 212 # Invalid UTF-8 encoding in bytestrings is not. Should raise a 213 # semi-useful error message. 214 test_template_sources('\xc3\xc3', template_dirs, UnicodeDecodeError) 280 281 load_name = 'test_include_error.html' 282 r = Nonedebug.py https://bitbucket.org/mirror/django/ | Python | 485 lines
11from django.core.urlresolvers import reverse 12from django.template import TemplateSyntaxError 13from django.views.debug import ExceptionReporter 56 setup_test_template_loader( 57 {'403.html': 'This is a test template for a 403 Forbidden error.'} 58 ) 96 request = self.rf.get('/test_view/') 97 raise ValueError("Can't find my keys") 98 except ValueError: 101 html = reporter.get_traceback_html() 102 self.assertIn('<h1>ValueError at /test_view/</h1>', html) 103 self.assertIn('<pre class="exception_value">Can't find my keys</pre>', html) 114 try: 115 raise ValueError("Can't find my keys") 116 except ValueError:tests.py https://bitbucket.org/mirror/django/ | Python | 404 lines
280 281 def test_file_error_blocking(self): 282 """ 282 """ 283 The server should not block when there are upload errors (bug #8622). 284 This can happen if something -- i.e. an exception handler -- tries to 314 self.failIf( 315 str(err) == str(reference_error), 316 "Caught a repeated exception that'll cause an infinite loop in file uploads." 318 except Exception, err: 319 # CustomUploadError is the error that should have been raised 320 self.assertEqual(err.__class__, uploadhandler.CustomUploadError) 386 self.obj.testfile.save('foo.txt', SimpleUploadedFile('foo.txt', 'x')) 387 except IOError, err: 388 # The test needs to be done on a specific string as IOErrortests.py https://bitbucket.org/mirror/django/ | Python | 1307 lines
64 os.remove(full_name + 'c') 65 except OSError: 66 pass 120 from subprocess import Popen, PIPE 121 except ImportError: 122 stdin, stdout, stderr = os.popen3(cmd) 188 def test_builtin_command(self): 189 "no settings: django-admin builtin commands fail with an import error when no settings provided" 190 args = ['sqlall','admin_scripts'] 220 def test_builtin_command(self): 221 "default: django-admin builtin commands fail with an import error when no settings provided" 222 args = ['sqlall','admin_scripts'] 286 def test_builtin_command(self): 287 "fulldefault: django-admin builtin commands fail with an import error when no settings provided" 288 args = ['sqlall','admin_scripts']tests.py https://bitbucket.org/mirror/django/ | Python | 378 lines
73 74 def test_tabular_non_field_errors(self): 75 """ 75 """ 76 Ensure that non_field_errors are displayed correctly, including the 77 right value for colspan. Refs #13510. 88 # Here colspan is "4": two fields (title1 and title2), one hidden field and the delete checkbock. 89 self.assertContains(response, '<tr><td colspan="4"><ul class="errorlist"><li>The two titles must be the same</li></ul></td></tr>') 90tests.py https://bitbucket.org/mirror/django/ | Python | 1190 lines
38 Make sure that an add form that is filled out, but marked for deletion 39 doesn't cause validation errors. 40 """ 64 Make sure that an add form that is filled out, but marked for deletion 65 doesn't cause validation errors. 66 """tests.py https://bitbucket.org/mirror/django/ | Python | 1485 lines
9from django.core.files.uploadedfile import SimpleUploadedFile 10from django.core.validators import ValidationError 11from django.db import connection 410 form = ProductForm({'slug': 'teddy-bear-blue'}) 411 self.assertEqual(len(form.errors), 1) 412 self.assertEqual(form.errors['slug'], [u'Product with this Slug already exists.']) 422 self.assertFalse(form.is_valid()) 423 self.assertEqual(len(form.errors), 1) 424 self.assertEqual(form.errors['__all__'], [u'Price with this Price and Quantity already exists.']) 432 self.assertFalse(form.is_valid()) 433 self.assertEqual(len(form.errors), 1) 434 self.assertEqual(form.errors['__all__'], [u'Book with this Title and Author already exists.']) 445 self.assertFalse(form.is_valid()) 446 self.assertEqual(len(form.errors), 1) 447 self.assertEqual(form.errors['special_id'], [u'Book with this Special id already exists.'])tests.py https://bitbucket.org/mirror/django/ | Python | 475 lines
176 177 def test_attribute_error(self): 178 qs = Reader.objects.all().prefetch_related('books_read__xyz') 178 qs = Reader.objects.all().prefetch_related('books_read__xyz') 179 with self.assertRaises(AttributeError) as cm: 180 list(qs) 185 qs = Book.objects.prefetch_related('authors__name') 186 with self.assertRaises(ValueError) as cm: 187 list(qs)models.py https://bitbucket.org/mirror/django/ | Python | 350 lines
204class NonUniqueFKTarget2(models.Model): 205 """ Model to test for non-unique FK target in previously seen model: expect an error """ 206 tgt = models.ForeignKey(FKTarget, to_field='bad') 208class UniqueFKTarget2(models.Model): 209 """ Model to test for unique FK target in previously seen model: expect no error """ 210 tgt = models.ForeignKey(FKTarget, to_field='good') 235 236model_errors = """invalid_models.fielderrors: "charfield": CharFields require a "max_length" attribute that is a positive integer. 237invalid_models.fielderrors: "charfield2": CharFields require a "max_length" attribute that is a positive integer. 239invalid_models.fielderrors: "decimalfield": DecimalFields require a "decimal_places" attribute that is a non-negative integer. 240invalid_models.fielderrors: "decimalfield": DecimalFields require a "max_digits" attribute that is a positive integer. 241invalid_models.fielderrors: "decimalfield2": DecimalFields require a "decimal_places" attribute that is a non-negative integer. 241invalid_models.fielderrors: "decimalfield2": DecimalFields require a "decimal_places" attribute that is a non-negative integer. 242invalid_models.fielderrors: "decimalfield2": DecimalFields require a "max_digits" attribute that is a positive integer. 243invalid_models.fielderrors: "decimalfield3": DecimalFields require a "decimal_places" attribute that is a non-negative integer.tests.py https://bitbucket.org/mirror/django/ | Python | 412 lines
67 68 # Adding an object of the wrong type raises TypeError. 69 self.assertRaises(TypeError, self.r.article_set.add, self.r2)testcases.py https://bitbucket.org/mirror/django/ | Python | 532 lines
17 all 18except NameError: 19 from django.utils.itercompat import all 205 example, exc_info) 206 # Rollback, in case of database errors. Otherwise they'd have 207 # side effects on other tests. 259 import sys 260 result.addError(self, sys.exc_info()) 261 return 268 import sys 269 result.addError(self, sys.exc_info()) 270 returncase.py https://bitbucket.org/mirror/django/ | Python | 1096 lines
113 exc_name = self.expected.__name__ 114 except AttributeError: 115 exc_name = str(self.expected) 178 # the instance's assertion methods fail; test methods raising this 179 # exception will be deemed to have 'failed' rather than 'errored' 180 180 181 failureException = AssertionError 182 200 """Create an instance of the class that will use the named test 201 method when executed. Raises a ValueError if the instance does 202 not have a method with the specified name. 207 testMethod = getattr(self, methodName) 208 except AttributeError: 209 raise ValueError("no such test method in %s: %s" % \base.py https://bitbucket.org/mirror/django/ | Python | 975 lines
5import django.db.models.manager # Imported to register signal handler. 6from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned, FieldError, ValidationError, NON_FIELD_ERRORS 7from django.core import validators 12from django.db.models.options import Options 13from django.db import connections, router, transaction, DatabaseError, DEFAULT_DB_ALIAS 14from django.db.models import signals 106 if parent._meta.fields: 107 raise TypeError("Abstract base class containing model fields not permitted for proxy model '%s'." % name) 108 else: 110 if base is not None: 111 raise TypeError("Proxy model '%s' has more than one non-abstract model base class." % name) 112 else: 114 if base is None: 115 raise TypeError("Proxy model '%s' has no non-abstract model base class." % name) 116 if (new_class._meta.local_fields ormodels.py https://bitbucket.org/mirror/django/ | Python | 850 lines
11from django.core.exceptions import SuspiciousOperation 12from django.template import TemplateDoesNotExist, TemplateSyntaxError, Context 13from django.template import loader 36 self.assertContains(response, 'text', status_code=999) 37 except AssertionError, e: 38 self.assertTrue("Couldn't retrieve content: Response code was 200 (expected 999)" in str(e)) 40 self.assertContains(response, 'text', status_code=999, msg_prefix='abc') 41 except AssertionError, e: 42 self.assertTrue("abc: Couldn't retrieve content: Response code was 200 (expected 999)" in str(e)) 45 self.assertNotContains(response, 'text', status_code=999) 46 except AssertionError, e: 47 self.assertTrue("Couldn't retrieve content: Response code was 200 (expected 999)" in str(e)) 49 self.assertNotContains(response, 'text', status_code=999, msg_prefix='abc') 50 except AssertionError, e: 51 self.assertTrue("abc: Couldn't retrieve content: Response code was 200 (expected 999)" in str(e))__init__.py https://bitbucket.org/mirror/django/ | Python | 445 lines
64 class instance. All errors raised by the import process 65 (ImportError, AttributeError) are allowed to propagate. 66 """ 101 apps = cache.installed_apps 102 except (AttributeError, EnvironmentError, ImportError): 103 apps = [] 109 project_directory = setup_environ(module, settings.SETTINGS_MODULE) 110 except (AttributeError, EnvironmentError, ImportError, KeyError): 111 project_directory = None 118 for name in find_commands(path)])) 119 except ImportError: 120 pass # No management module - ignore this app 154 except KeyError: 155 raise CommandError("Unknown command: %r" % name) 156trans_real.py https://bitbucket.org/mirror/django/ | Python | 556 lines
72 self.set_output_charset('utf-8') 73 except AttributeError: 74 pass 130 return t 131 except IOError, e: 132 return None 160 app = import_module(appname) 161 except ImportError: 162 if not '.' in appname: 223 return to_language(t.language()) 224 except AttributeError: 225 passoptions.py https://bitbucket.org/mirror/django/ | Python | 1288 lines
11from django.core.apps import cache 12from django.core.exceptions import PermissionDenied, ValidationError 13from django.db import models, transactionsites.py https://bitbucket.org/mirror/django/ | Python | 539 lines
18 19ERROR_MESSAGE = ugettext_lazy("Please enter a correct username and password. Note that both fields are case-sensitive.") 20LOGIN_FORM_KEY = 'this_is_the_login_form' 118 """ 119 Disable a globally-registered action. Raises KeyError for invalid names. 120 """ 125 Explicitally get a registered global action wheather it's enabled or 126 not. Raises KeyError for invalid names. 127 """ 324 if user is None: 325 message = ERROR_MESSAGE 326 if username is not None and u'@' in username: 345 else: 346 return self.display_login_form(request, ERROR_MESSAGE) 347 login = never_cache(login)tests.py https://bitbucket.org/mirror/django/ | Python | 638 lines
55 """ 56 unicode(string_concat(...)) should not raise a TypeError - #4796 57 """ 197 self.assertEqual(False, form.is_valid()) 198 self.assertEqual([u'Introdu\xefu un n\xfamero.'], form.errors['float_field']) 199 self.assertEqual([u'Introdu\xefu un n\xfamero.'], form.errors['decimal_field']) 199 self.assertEqual([u'Introdu\xefu un n\xfamero.'], form.errors['decimal_field']) 200 self.assertEqual([u'Introdu\xefu una data v\xe0lida.'], form.errors['date_field']) 201 self.assertEqual([u'Introdu\xefu una data/hora v\xe0lides.'], form.errors['datetime_field']) 201 self.assertEqual([u'Introdu\xefu una data/hora v\xe0lides.'], form.errors['datetime_field']) 202 self.assertEqual([u'Introdu\xefu un n\xfamero sencer.'], form.errors['integer_field']) 203tests.py https://bitbucket.org/mirror/django/ | Python | 656 lines
15from django.core.cache import get_cache 16from django.core.cache.backends.base import InvalidCacheBackendError, CacheKeyWarning 17from django.http import HttpResponse, HttpRequest 86 self.cache.set('answer', 42) 87 self.assertRaises(ValueError, self.cache.incr, 'answer') 88 self.assertRaises(ValueError, self.cache.incr, 'does_not_exist') 92 self.cache.set('answer', 42) 93 self.assertRaises(ValueError, self.cache.decr, 'answer') 94 self.assertRaises(ValueError, self.cache.decr, 'does_not_exist') 207 self.assertEqual(self.cache.get('answer'), 52) 208 self.assertRaises(ValueError, self.cache.incr, 'does_not_exist') 209 216 self.assertEqual(self.cache.get('answer'), 32) 217 self.assertRaises(ValueError, self.cache.decr, 'does_not_exist') 218widgets.py https://bitbucket.org/mirror/django/ | Python | 1326 lines
186FileInput widgets don't ever show the value, because the old value is of no use 187if you are updating the form or if the provided file generated an error. 188>>> w = FileInput()__init__.py https://bitbucket.org/mirror/django/ | Python | 518 lines
2import re 3from Cookie import BaseCookie, SimpleCookie, CookieError 4from pprint import pformat 149 self.appendlist(force_unicode(key, encoding, errors='replace'), 150 force_unicode(value, encoding, errors='replace')) 151 self._mutable = mutable 167 if not self._mutable: 168 raise AttributeError("This QueryDict instance is immutable") 169 294 self._strict_set(key, real_value, coded_value) 295 except CookieError: 296 self.bad_cookies.append(key) 316 317class BadHeaderError(ValueError): 318 passclient.py https://bitbucket.org/mirror/django/ | Python | 511 lines
9 from cStringIO import StringIO 10except ImportError: 11 from StringIO import StringIO 184 self.exc_info = None 185 self.errors = StringIO() 186 230 'wsgi.url_scheme': 'http', 231 'wsgi.errors': self.errors, 232 'wsgi.multiprocess': True, 252 # the 500.html template. If that template is not available, 253 # we should ignore the error in favor of re-raising the 254 # underlying exception that caused the 500 error. Any other 254 # underlying exception that caused the 500 error. Any other 255 # template found to be missing during view error handling 256 # should be reported as-is.defaultfilters.py https://bitbucket.org/mirror/django/ | Python | 931 lines
7 from functools import wraps 8except ImportError: 9 from django.utils.functional import wraps # Python 2.4 fallback. 126 d = Decimal(input_val) 127 except UnicodeEncodeError: 128 return u'' 133 d = Decimal(force_unicode(float(text))) 134 except (ValueError, InvalidOperation, TypeError, UnicodeEncodeError): 135 return u'' 142 m = int(d) - d 143 except (ValueError, OverflowError, InvalidOperation): 144 return input_val 233 return (u"%" + unicode(arg)) % value 234 except (ValueError, TypeError): 235 return u""query.py https://bitbucket.org/mirror/django/ | Python | 1907 lines
23 ExtraWhere, AND, OR) 24from django.core.exceptions import FieldError 25 210 if using is None and connection is None: 211 raise ValueError("Need either using or connection") 212 if using: