The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Error messages

Last post 08-20-2008 8:38 AM by xan. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-20-2008 7:45 AM

    • xan
    • Not Ranked
    • Joined on 08-20-2008
    • Portsmouth, United Kingdom
    • Posts 9

    Error messages

    Seen in code at work, I love error messages like this :D. try { FileManager.Save(Data, OpenCurrentFileStream(System.IO.FileAccess.ReadWrite) ); } catch( System.UnauthorizedAccessException ) { MessageBox.Show("File is probably Read Only, check it out or something", "Save Error"); } Edit: how do you retain original formatting? :S
  • 08-20-2008 7:56 AM In reply to

    Re: Error messages

    try the <pre> tag:

    try { 
        FileManager.Save(Data, OpenCurrentFileStream(System.IO.FileAccess.ReadWrite) ); 
    } catch (System.UnauthorizedAccessException) { 
        MessageBox.Show("File is probably Read Only, check it out or something", "Save Error"); 
    }
    
  • 08-20-2008 7:56 AM In reply to

    Re: Error messages

    xan:

    Seen in code at work, I love error messages like this :D.

    try {

        FileManager.Save(Data, OpenCurrentFileStream(System.IO.FileAccess.ReadWrite) );
    } catch( System.UnauthorizedAccessException )

    {

       MessageBox.Show("File is probably Read Only, check it out or something", "Save Error");

    }

    Ken sent me
  • 08-20-2008 8:38 AM In reply to

    • xan
    • Not Ranked
    • Joined on 08-20-2008
    • Portsmouth, United Kingdom
    • Posts 9

    Re: Error messages

    snoofle:

    try the <pre> tag:

    try { 
        FileManager.Save(Data, OpenCurrentFileStream(System.IO.FileAccess.ReadWrite) ); 
    } catch (System.UnauthorizedAccessException) { 
        MessageBox.Show("File is probably Read Only, check it out or something", "Save Error"); 
    }
    

    Many thanks :)

Page 1 of 1 (4 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems