Processes the value of the source byte in the association abort, and prints an explanation of the source (of the error).

 === Parameters

 * <tt>source</tt> -- String. A code which informs which part has been the source of an error.
336569
def process_source(source)
      if source == "00"
        logger.warn("Connection has been aborted by the service provider because of an error by the service user (client side).")
      elsif source == "02"
        logger.warn("Connection has been aborted by the service provider because of an error by the service provider (server side).")
      else
        logger.warn("Connection has been aborted by the service provider, with an unknown cause of the problems. (error code: #{source})")
      end
    end
14962
def execute
      process_output(execute!)

    rescue ::OpenSSL::Cipher::CipherError => e
      { reason:    'Invalid key provided',
        exception: e }

    rescue Sym::Errors::Error => e
      { reason:    e.class.name.gsub(/.*::/, '').underscore.humanize.downcase,
        exception: e }

    rescue TypeError => e
      if e.message =~ /marshal/m
        { reason:    'Corrupt source data or invalid/corrupt key provided',
          exception: e }
      else
        { exception: e }
      end

    rescue StandardError => e
      { exception: e }
    end
317439
public void error(String message, String sourceString,
                    int position, int startPosition, int endPosition,
                    Object info) {
    report(new AnnotationReport(Kind.ERROR, message, sourceString,
                                position, startPosition, endPosition, info));
  }
1091134
def check(args, source_code, filename=None, options=None):
    """"""
    if args is None:
        return []
    if options is not None:
        args += options
    if any(['pyflakes' in arg for arg in args]):
        #  Pyflakes requires an ending new line (pycodestyle don't! -- see Issue 1123)
        #  Note: this code is not used right now as it is faster to invoke 
        #  pyflakes in current Python interpreter (see `check_with_pyflakes` 
        #  function above) than calling it through a subprocess
        source_code += '\n'
    if filename is None:
        # Creating a temporary file because file does not exist yet 
        # or is not up-to-date
        tempfd = tempfile.NamedTemporaryFile(suffix=".py", delete=False)
        tempfd.write(source_code)
        tempfd.close()
        args.append(tempfd.name)
    else:
        args.append(filename)
    cmd = args[0]
    cmdargs = args[1:]
    proc = programs.run_program(cmd, cmdargs)
    output = proc.communicate()[0].strip().decode().splitlines()
    if filename is None:
        os.unlink(tempfd.name)
    results = []
    coding = encoding.get_coding(source_code)
    lines = source_code.splitlines()
    for line in output:
        lineno = int(re.search(r'(\:[\d]+\:)', line).group()[1:-1])
        try:
            text = to_text_string(lines[lineno-1], coding)
        except TypeError:
            text = to_text_string(lines[lineno-1])
        except UnicodeDecodeError:
            # Needed to handle UnicodeDecodeError and force the use
            # of chardet to detect enconding. See issue 6970
            coding = encoding.get_coding(source_code, force_chardet=True)
            text = to_text_string(lines[lineno-1], coding)
        if 'analysis:ignore' not in text:
            message = line[line.find(': ')+2:]
            results.append((message, lineno))
    return results
800269
def build_association_abort
      # Big endian encoding:
      @outgoing.endian = @net_endian
      # Clear the outgoing binary string:
      @outgoing.reset
      # Reserved (2 bytes)
      @outgoing.encode_last("00"*2, "HEX")
      # Source (1 byte)
      source = "00" # (client side error)
      @outgoing.encode_last(source, "HEX")
      # Reason/Diag. (1 byte)
      reason = "00" # (Reason not specified)
      @outgoing.encode_last(reason, "HEX")
      append_header(PDU_ABORT)
    end
1263246
def source(self, value):
        
        if not isinstance(value, tuple) or len(value) != 2:
            raise AttributeError
        self._source = value
25883
protected static StringBuilder handleExceptionStart(Exception e) {
        LOG.warning(ExceptionUtils.getStackTrace(e));
        StringBuilder sb = new StringBuilder();
        if (e.getMessage() != null) {
            sb.append(e.getMessage()).append(". ");
        }
        if (e.getCause() != null && e.getCause().getMessage() != null) {
            sb.append(e.getCause().getMessage()).append(". ");
        }
        return sb;
    }
769799
private String appendErrorContext(String reason) {
        // Note: This relies on the calling code maintaining the ruleIndex
        // at a position that is useful for debugging.
        // For example, at the beginning of a reset or relation etc.
        StringBuilder msg = new StringBuilder(reason);
        msg.append(" at index ").append(ruleIndex);
        // We are not counting line numbers.

        msg.append(" near \"");
        // before ruleIndex
        int start = ruleIndex - (U_PARSE_CONTEXT_LEN - 1);
        if(start < 0) {
            start = 0;
        } else if(start > 0 && Character.isLowSurrogate(rules.charAt(start))) {
            ++start;
        }
        msg.append(rules, start, ruleIndex);

        msg.append('!');
        // starting from ruleIndex
        int length = rules.length() - ruleIndex;
        if(length >= U_PARSE_CONTEXT_LEN) {
            length = U_PARSE_CONTEXT_LEN - 1;
            if(Character.isHighSurrogate(rules.charAt(ruleIndex + length - 1))) {
                --length;
            }
        }
        msg.append(rules, ruleIndex, ruleIndex + length);
        return msg.append('\"').toString();
    }
455772
@Override
    String sourceContentFor(String aSource, Boolean nullOnMissing) {
        if (this.sourcesContent == null) {
            return null;
        }

        if (this.sourceRoot != null) {
            aSource = Util.relative(this.sourceRoot, aSource);
        }

        if (this._sources.has(aSource)) {
            return this.sourcesContent.get(this._sources.indexOf(aSource));
        }

        ParsedUrl url;
        if (this.sourceRoot != null && ((url = Util.urlParse(this.sourceRoot)) != null)) {
            // XXX: file:// URIs and absolute paths lead to unexpected behavior for
            // many users. We can help them out when they expect file:// URIs to
            // behave like it would if they were running a local HTTP server. See
            // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
            String fileUriAbsPath = aSource.replaceAll("^file://", "");
            if (url.scheme.equals("file") && this._sources.has(fileUriAbsPath)) {
                return this.sourcesContent.get(this._sources.indexOf(fileUriAbsPath));
            }

            if ((url.path == null || url.path.equals("/")) && this._sources.has("/" + aSource)) {
                return this.sourcesContent.get(this._sources.indexOf("/" + aSource));
            }
        }

        // This function is used recursively from
        // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
        // don't want to throw if we can't find the source - we just want to
        // return null, so we provide a flag to exit gracefully.
        if (nullOnMissing != null && nullOnMissing) {
            return null;
        } else {
            throw new RuntimeException("\"" + aSource + "\" is not in the SourceMap.");
        }
    }
1071454
@Override
    public void handleError(Source source, int line, int column,
            String msg)
            throws LexerException {
        errors++;
        print(source.getName() + ":" + line + ":" + column
                + ": error: " + msg);
    }
1108830
protected static final String parseString(Source src) {
		char c = src.chars[src.idx];
		if (src.idx <= src.last && c == '"') {
			src.idx++;
		}
		final int start = src.idx;
		loop: for (; src.idx <= src.last; src.idx++) {
			c = src.chars[src.idx];
			if (c == '"') {
				break;
			}
			if (c == '\\') {
				boolean escape = false;
				for (; src.idx <= src.last; src.idx++) {
					c = src.chars[src.idx];
					if (c == '"') {
						if (!escape) {
							break loop;
						}
					} else if (c == '\\') {
						escape = !escape;
					} else {
						escape = false;
					}
				}
				break;
			}
		}
		if (src.idx == start) {
			src.idx++;
			return "";
		}
		char[] chars = new char[src.idx - start];
		int to = 0;
		int from = start;
		while (true) {
			c = src.chars[from];
			if (c == '\\') {
				from++;
				c = src.chars[from];
				if (c != 'u') {
					switch (c) {
					case 't':
						chars[to++] = '\t';
						break;
					case 'b':
						chars[to++] = '\b';
						break;
					case 'n':
						chars[to++] = '\n';
						break;
					case 'r':
						chars[to++] = '\r';
						break;
					case 'f':
						chars[to++] = '\f';
						break;
					case '\'':
						chars[to++] = '\'';
						break;
					case '"':
						chars[to++] = '"';
						break;
					case '\\':
						chars[to++] = '\\';
						break;
					default:
						chars[to++] = c;
					}
				} else {
					if (from + 4 < to) {
						String hex = new String(chars, from + 1, 4);
						char unicode = (char) Integer.parseInt(hex, 16);
						chars[to++] = unicode;
						from += 4;
					}
				}
			} else {
				chars[to++] = c;
			}
			if (from >= src.idx - 1) {
				break;
			}
			from++;
		}
		String value = new String(chars, 0, to);
		if (src.idx <= src.last) {
			src.idx++;
		}
		return value;
	}
750869
def aborted(self, exc_info):
        
        self.exc_info = exc_info
        self.did_end = True
        self.write(format_exception(*self.exc_info))
760117
private void emitStringValue(String s) {
    raw('"');
    char b = 0, c = 0;
    for (int i = 0; i < s.length(); i++) {
      b = c;
      c = s.charAt(i);

      switch (c) {
        case '\\':
        case '"':
          raw('\\');
          raw(c);
          break;
        case '/':
          // Special case to ensure that </script> doesn't appear in JSON
          // output
          if (b == '<')
            raw('\\');
          raw(c);
          break;
        case '\b':
          raw("\\b");
          break;
        case '\t':
          raw("\\t");
          break;
        case '\n':
          raw("\\n");
          break;
        case '\f':
          raw("\\f");
          break;
        case '\r':
          raw("\\r");
          break;
        default:
          if (shouldBeEscaped(c)) {
            String t = "000" + Integer.toHexString(c);
            raw("\\u" + t.substring(t.length() - "0000".length()));
          } else {
            raw(c);
          }
      }
    }

    raw('"');
  }
241659
def extract_exception(payload)
      return {} unless payload[:exception]

      exception, message = payload[:exception]
      status = ActionDispatch::ExceptionWrapper.status_code_for_exception(exception)
      error_source = $!.backtrace.find { |line| line.match(/\A#{Rails.root}/) }

      result = { status: status }
      result[:error_class] = exception
      result[:error_message] = message
      result[:error_source] = error_source.gsub(/\A#{Dir.pwd}/, '') if error_source
      result[:error_backtrace] = $!.backtrace
      if $!.respond_to?(:cause) && $!.cause
        result[:error_cause] = [$!.cause.class.to_s, $!.cause.message].concat($!.cause.backtrace)
      end
      result
    end
625252
def from_string(cls, source, **kwargs):
        
        error_handling = kwargs.pop('error_handling', None)
        new_file = cls(**kwargs)
        new_file.read(source.splitlines(True), error_handling=error_handling)
        return new_file
546827
def handle_err(*args):
    
    if DEBUG:
        print_err(traceback.format_exc(), color=False)
    else:
        print_err(*args, newline=True)
1355687
@SuppressWarnings("unused")
	private void executeProgram(String name, String[] source) throws Exception
	{
		String _singleStringSource = executeProgram__makeSingleStringSource(source);
		executeProgram(name, _singleStringSource);
	}