summaryrefslogtreecommitdiffstats
path: root/test/unit/lib/redmine/field_format/version_field_format_test.rb
Commit message (Expand)AuthorAgeFilesLines
* Use `fixtures :all` to ensure consistent test data and improve test reliabili...Go MAEDA2024-12-111-6/+0
* Fix RuboCop offense Layout/SpaceAfterComma, one of the offenses enabled in ru...Go MAEDA2024-08-121-1/+1
* Remove current year from source file copyright headers and update year in foo...Marius Balteanu2024-02-261-1/+1
* Use `require_relative` instead of `require File.expand_path(..., __FILE__)` (...Go MAEDA2023-01-011-1/+1
* Update copyright year to 2023 (#38141).Go MAEDA2023-01-011-1/+1
* Update copyright year in source files to 2022 (#36379).Go MAEDA2022-01-021-1/+1
* Update copyright year in source files to 2021 (#33069).Go MAEDA2021-03-251-1/+1
* shorten long line of test/unit/lib/redmine/field_format/version_field_format_...Toshi MARUYAMA2020-12-091-11/+26
* Update copyright year in source files to 2020 (#33069).Go MAEDA2020-03-031-1/+1
* cleanup: rubocop: fix Layout/AlignArguments in test/unit/lib/redmine/field_fo...Toshi MARUYAMA2019-11-231-1/+3
* Remove trailing whitespaces from test (#31506).Go MAEDA2019-06-061-1/+1
* Update copyright year.Go MAEDA2019-05-251-1/+1
* Enable frozen_string_literal for some files under test directory (#26561).Go MAEDA2019-03-161-1/+1
* Add "frozen_string_literal: false" for all files (#26561).Go MAEDA2019-03-151-0/+2
* Add missing fixtures to several tests (#30276).Go MAEDA2019-01-091-1/+2
* Test failure.Jean-Philippe Lang2018-12-161-1/+1
* Tests for #29674.Jean-Philippe Lang2018-11-281-0/+14
* Update copyright.Jean-Philippe Lang2017-06-251-1/+1
* Test failures.Jean-Philippe Lang2017-03-031-0/+5
* Group versions by status in version custom field filter (#23265).Jean-Philippe Lang2017-01-141-2/+14
* Don't preload custom field filter values (#24787).Jean-Philippe Lang2017-01-121-1/+1
* Allow global versions to be shown outside of a project for version custom fie...Jean-Philippe Lang2016-06-181-0/+9
* Updates copyright for 2016.Jean-Philippe Lang2016-03-131-1/+1
* Display all versions in query filter (#19271).Jean-Philippe Lang2015-09-261-0/+10
* Copyright update.Jean-Philippe Lang2015-01-111-1/+1
* add missing fixtures to Redmine::VersionFieldFormatTestToshi MARUYAMA2014-09-121-1/+4
* Fixed that custom field referencing deleted value trigger an error on display...Jean-Philippe Lang2014-05-241-0/+7
* update copyright year (#15977)Toshi MARUYAMA2014-01-291-1/+1
* remove unneeded including ApplicationHelper from helper testsToshi MARUYAMA2013-12-261-2/+0
* Merged custom fields format refactoring.Jean-Philippe Lang2013-12-141-0/+61
ght 2000-2016 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.vaadin.server; /** * <code>SystemError</code> is an error message for a problem caused by error in * system, not the user application code. The system error can contain technical * information such as stack trace and exception. * * SystemError does not support HTML in error messages or stack traces. If HTML * messages are required, use {@link UserError} or a custom implementation of * {@link ErrorMessage}. * * @author Vaadin Ltd. * @since 3.0 */ @SuppressWarnings("serial") public class SystemError extends AbstractErrorMessage { /** * Constructor for SystemError with error message specified. * * @param message * the Textual error description. */ public SystemError(String message) { super(message); setErrorLevel(ErrorLevel.SYSTEMERROR); setMode(ContentMode.HTML); setMessage(getHtmlMessage()); } /** * Constructor for SystemError with causing exception and error message. * * @param message * the Textual error description. * @param cause * the throwable causing the system error. */ public SystemError(String message, Throwable cause) { this(message); addCause(AbstractErrorMessage.getErrorMessageForException(cause)); } /** * Constructor for SystemError with cause. * * @param cause * the throwable causing the system error. */ public SystemError(Throwable cause) { this(null, cause); } /** * Returns the message of the error in HTML. * * Note that this API may change in future versions. */ protected String getHtmlMessage() { // TODO wrapping div with namespace? See the old code: // target.addXMLSection("div", message, // "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"); StringBuilder sb = new StringBuilder(); if (getMessage() != null) { sb.append("<h2>"); sb.append(VaadinServlet.safeEscapeForHtml(getMessage())); sb.append("</h2>"); } return sb.toString(); } }