all repos — fluxbox @ 12488d4f56aa964345af5fe0db441c3840d80e37

custom fork of the fluxbox windowmanager

throws string instead of number
fluxgen fluxgen
commit

12488d4f56aa964345af5fe0db441c3840d80e37

parent

3633489dbffbb798cfe0ce948cdf933e3fdb31a1

1 files changed, 7 insertions(+), 8 deletions(-)

jump to
M src/BaseDisplay.ccsrc/BaseDisplay.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: BaseDisplay.cc,v 1.24 2002/12/01 13:41:54 rathnor Exp $ +// $Id: BaseDisplay.cc,v 1.25 2002/12/02 20:02:56 fluxgen Exp $

@@ -146,21 +146,20 @@ last_bad_window = None;

I18n *i18n = I18n::instance(); if (display() == 0) { - fprintf(stderr, + throw string( i18n-> getMessage( FBNLS::BaseDisplaySet, FBNLS::BaseDisplayXConnectFail, - "BaseDisplay::BaseDisplay: connection to X server failed.\n")); - - throw static_cast<int>(2); //throw error 2 + "BaseDisplay::BaseDisplay: connection to X server failed.")); + } else if (fcntl(ConnectionNumber(display()), F_SETFD, 1) == -1) { - fprintf(stderr, + throw string( i18n-> getMessage( FBNLS::BaseDisplaySet, FBNLS::BaseDisplayCloseOnExecFail, "BaseDisplay::BaseDisplay: couldn't mark display connection " - "as close-on-exec\n")); - throw static_cast<int>(2); //throw error 2 + "as close-on-exec")); + }