Skip to content

Instantly share code, notes, and snippets.

@geniys
Last active May 25, 2016 02:00
Show Gist options
  • Save geniys/3259fbd6b08063c6b0b3ea3f11688ea3 to your computer and use it in GitHub Desktop.
Save geniys/3259fbd6b08063c6b0b3ea3f11688ea3 to your computer and use it in GitHub Desktop.

Revisions

  1. geniys revised this gist May 25, 2016. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions cplusplus.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    # Link
    [C++ FAQ](https://isocpp.org/wiki/faq)

    # Catch exception from constructor initializer list
    ``` cpp
    // foo.h
  2. geniys revised this gist May 25, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions cplusplus.md
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,14 @@
    # Catch exception from constructor initializer list
    ``` cpp
    foo.h
    // foo.h
    class Foo {
    public:
    Foo();
    private;
    Bar mBar;
    }

    foo.cpp
    // foo.cpp
    class Foo::Foo() try : mBar() {
    // constructor
    } catch ( ... ) {
  3. geniys renamed this gist May 25, 2016. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions cplusplus.txt → cplusplus.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    Catch exception from constructor initializer list

    # Catch exception from constructor initializer list
    ``` cpp
    foo.h
    class Foo {
    public:
    @@ -10,5 +10,8 @@ private;

    foo.cpp
    class Foo::Foo() try : mBar() {
    // constructor
    } catch ( ... ) {
    }
    // handle exception
    }
    ```
  4. geniys created this gist May 25, 2016.
    14 changes: 14 additions & 0 deletions cplusplus.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    Catch exception from constructor initializer list

    foo.h
    class Foo {
    public:
    Foo();
    private;
    Bar mBar;
    }

    foo.cpp
    class Foo::Foo() try : mBar() {
    } catch ( ... ) {
    }