It controls errors. If there is an error,
        returns channel list screen with error message.
508069
def channel_choice_control(self):
        
        self.current.task_data['control'], self.current.task_data['msg'] \
            = self.selection_error_control(self.input['form'])
        if self.current.task_data['control']:
            self.current.task_data['option'] = self.input['cmd']
            self.current.task_data['split_operation'] = False
            keys, names = self.return_selected_form_items(self.input['form']['ChannelList'])
            self.current.task_data['chosen_channels'] = keys
            self.current.task_data['chosen_channels_names'] = names
703656
def check_ramp_for_errors(ramp_data):
    """"""
    error_list = []
    keyframe_list = ramps.KeyFrameList(ramp_data['keyframes'])
    sorted_key_list = keyframe_list.sorted_key_list()
    channel_list = [ramps.Channel(ch_name, ramp_data['channels'][ch_name],
                                  keyframe_list)
                    for ch_name in ramp_data['channels']]
    sorted_absolute_times = [keyframe_list.get_absolute_time(sk) for sk
                             in sorted_key_list]
    ramp_properties = ramp_data['properties']
    jump_resolution = ramp_properties['jump_resolution']
    for key_name, abs_time in zip(sorted_key_list, sorted_absolute_times):
        # check if all times are +ve
        if abs_time < 0.0:
            error_fmt = "keyframe \'{0}\' has negative absolute time {1}"
            error_str = error_fmt.format(key_name, abs_time)
            error_list.append(error_str)

        # check if all times are a multiple of minimum resolution
        steps_float = abs_time / jump_resolution
        steps_residue = steps_float - round(steps_float)
        if steps_residue > 0.0001:
            error_fmt = ("keyframe \'{0}\' has absolute time {1} which is not"
                         " a multiple of jump_resolution {2}")
            error_str = error_fmt.format(key_name, abs_time, jump_resolution)
            error_list.append(error_str)

    # find missing channels
    ch_ids = digital_channel_ids()
    ch_ids += dev2_analog_ids()
    # ignore p31, since we used that for Dev1 timing
    for ch_id in ch_ids:
        n_found = 0
        for ch in channel_list:
            if ch.dct['id'] == ch_id:
                n_found += 1
        if n_found != 1:
            error_fmt = '{0} copies of {1} found. There should only be 1'
            error_str = error_fmt.format(n_found, ch_id)
            error_list.append(error_str)

    # check for timing overlap in keyframelist
    error_keyname = keyframe_list.do_keyframes_overlap()
    if error_keyname is not None:
        error_fmt = '{0} overlaps with the next keyframe'
        error_str = error_fmt.format(error_keyname)
        error_list.append(error_str)


    return error_list
1118976
def send_errors_to_logging():
    """"""
    error_output = vtk.vtkStringOutputWindow()
    error_win = vtk.vtkOutputWindow()
    error_win.SetInstance(error_output)
    obs = Observer()
    return obs.observe(error_output)
1256061
def _get_errors(self):
        
        errors = self.json.get('data').get('failures')
        if errors:
            logger.error(errors)
        return errors
564149
def get_errors(self):
        
        result = []
        while not self.errors.empty():  # pragma: no cover
            try:
                e = self.errors.get(False)
                result.append(e)
            except self.errors.Empty:
                continue
            self.errors.task_done()
        return result
541005
def is_error(self):
        """"""
        from ambry.valuetype.core import ROLE
        return self.role == ROLE.ERROR
89485
def modify_usage_error(subcommand, program_list):
    
    import click
    from click._compat import get_text_stderr
    from click.utils import echo

    def show(self, file=None):
        import sys
        if file is None:
            file = get_text_stderr()
        color = None
        if self.ctx is not None:
            color = self.ctx.color
        echo('Error: %s\n' % self.format_message(), file=file, color=color)
        # Set the sys.argv to be the first two arguments passed to the script if the subcommand was specified
        arg2 = sys.argv[1] if sys.argv[1] in program_list else str()
        sys.argv = [' '.join([sys.argv[0], arg2])] if arg2 else [sys.argv[0]]
        # Call the help
        subcommand(['--help'])

    click.exceptions.UsageError.show = show
494615
def show_error(self, *messages):
        """"""
        if not self.quiet:
            self.display(messages, main_sig, debug=True)
1352918
def check_error(when='periodic check'):
    

    errors = []
    while True:
        err = glGetError()
        if err == GL_NO_ERROR or (errors and err == errors[-1]):
            break
        errors.append(err)
    if errors:
        msg = ', '.join([repr(ENUM_MAP.get(e, e)) for e in errors])
        err = RuntimeError('OpenGL got errors (%s): %s' % (when, msg))
        err.errors = errors
        err.err = errors[-1]  # pyopengl compat
        raise err
838501
def check_errors(self):
        '''
        
        '''
        errors = ERROR_PATTTERN.findall(self.out)
        # "errors" is a list of tuples
        if errors:
            self.log.error('! Errors occurred:')

            self.log.error('\n'.join(
                [error.replace('\r', '').strip() for error
                 in chain(*errors) if error.strip()]
            ))

            self.log.error('! See "%s.log" for details.' % self.project_name)

            if self.opt.exit_on_error:
                self.log.error('! Exiting...')
                sys.exit(1)
805822
def _match_errors_queues(self, query):
        
        if query in self._error_queues:
            queue = self._error_queues[query]
            response = queue.value
            logger.debug('Found response in error queue: %s',
                         repr(response))

            return response
387429
def print_error(msg, color=True):
    
    if color and is_posix():
        safe_print(u"%s[ERRO] %s%s" % (ANSI_ERROR, msg, ANSI_END))
    else:
        safe_print(u"[ERRO] %s" % (msg))
509887
private function reportErrors()
    {
        if ( ! $this->errorReporting)
        {
            return;
        }

        set_error_handler([get_class(), 'errorHandler']);

        if ( ! empty($this->errors))
        {
            $this->isBufferReturned = true;
        }

        foreach ($this->errors as $error)
        {
            trigger_error($error->getMessage(), $error->getLevel());
        }

        restore_error_handler();
    }
221586
def _do_cb(self, cb, error_cb, *args, **kw):
        
        try:
            res = self.work(*args, **kw)
        except Exception as e:
            if error_cb is None:
                show_err()
            elif error_cb:
                error_cb(e)
        else:
            # Success, let's call away!
            cb(res)
601060
private void displayError(String message, boolean showForgotPassword, boolean showTime) {

        message = message.replace("\n", "<br />");
        if (showForgotPassword) {
            message += "<br /><br /><a href=\""
                + getResetPasswordLink()
                + "\">"
                + CmsVaadinUtils.getMessageText(Messages.GUI_FORGOT_PASSWORD_0)
                + "</a>";
        }
        if (showTime) {
            SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
            message += "<div style=\"position:absolute;right:6px;bottom:5px;\">"
                + CmsVaadinUtils.getMessageText(Messages.GUI_TIME_1, sdf.format(new Date()))
                + "</div>";
        }
        m_ui.showLoginError(message);
    }
194007
function(errors) {
      var
        html = '<ul class="list">'
      ;
      $.each(errors, function(index, value) {
        html += '<li>' + value + '</li>';
      });
      html += '</ul>';
      return $(html);
    }
536604
function(errors) {
			/// <summary>
			/// Show the specified messages.
			/// Keys have to refer to the names of elements, values are displayed for those elements, using the configured error placement.
			/// </summary>
			/// <param name="errors" type="Object">
			/// One or more key/value pairs of input names and messages.
			/// </param>

			if(errors) {
				// add items to error list and map
				$.extend( this.errorMap, errors );
				this.errorList = [];
				for ( var name in errors ) {
					this.errorList.push({
						message: errors[name],
						element: this.findByName(name)[0]
					});
				}
				// remove items from success list
				this.successList = $.grep( this.successList, function(element) {
					return !(element.name in errors);
				});
			}
			this.settings.showErrors
				? this.settings.showErrors.call( this, this.errorMap, this.errorList )
				: this.defaultShowErrors();
		}